maximuspowers's picture
Official ONNX conversion using Hugging Face Optimum
6503086 verified
|
raw
history blame
2.56 kB
metadata
license: apache-2.0
base_model: maximuspowers/smollm-convo-filler
tags:
  - onnx
  - transformers.js
  - text-generation
  - conversation
  - smollm
  - official-conversion
library_name: transformers.js
pipeline_tag: text-generation

smollm-convo-filler-onnx-official

This is an official ONNX conversion of maximuspowers/smollm-convo-filler using the standard Hugging Face Optimum library for Transformers.js compatibility.

πŸ”§ Official Conversion Method

This model was converted using the official Hugging Face method:

from optimum.onnxruntime import ORTModelForCausalLM

ort_model = ORTModelForCausalLM.from_pretrained(
    "maximuspowers/smollm-convo-filler",
    export=True,
    provider="CPUExecutionProvider",
    use_io_binding=False,
)

πŸš€ Usage with Transformers.js

import { pipeline } from '@huggingface/transformers';

const chatPipeline = await pipeline(
  'text-generation',
  'maximuspowers/smollm-convo-filler-onnx-official',
  {
    dtype: 'fp32',
    progress_callback: (data) => console.log('Loading:', data)
  }
);

const result = await chatPipeline('Q: Hello, how are you?\nA:', {
  max_new_tokens: 50,
  temperature: 0.7,
  do_sample: true,
  repetition_penalty: 1.1,
  pad_token_id: tokenizer.eos_token_id
});

console.log(result[0].generated_text);

πŸ”— Usage with Vercel AI SDK

import { transformers } from '@ai-sdk/transformers';

const model = transformers('maximuspowers/smollm-convo-filler-onnx-official', {
  dtype: 'fp32'
});

const { text } = await generateText({
  model,
  prompt: 'Hello, how are you?',
  maxTokens: 50,
});

πŸ—οΈ Model Details

  • Base Model: maximuspowers/smollm-convo-filler
  • Conversion Method: Official Hugging Face Optimum
  • Format: ONNX (CPUExecutionProvider)
  • Precision: Float32
  • Use Case: Conversational AI

πŸ“ File Structure

.
β”œβ”€β”€ README.md
β”œβ”€β”€ config.json                 # Model configuration
β”œβ”€β”€ tokenizer.json              # Fast tokenizer
β”œβ”€β”€ tokenizer_config.json       # Tokenizer settings
β”œβ”€β”€ generation_config.json      # Generation parameters
β”œβ”€β”€ special_tokens_map.json     # Special tokens
└── onnx/
    β”œβ”€β”€ model.onnx              # ONNX model file
    └── config.json             # ONNX configuration

πŸ“œ License

Same as base model: Apache 2.0


Official ONNX conversion using Hugging Face Optimum