Downloads · 30 days
0
gianlucamazza/SmolLM2-360M-Instruct-ort-genai-int4-cpu
SmolLM2-360M-Instruct-ort-genai-int4-cpu is a text generation model from gianlucamazza. Use it when you need the model to write or continue text. It is set up for onnxruntime-genai. The card lists the license as apache-2.0.
An int4 ONNX export of HuggingFaceTB/SmolLM2-360M-Instruct for ONNX Runtime GenAI on the CPU execution provider.
Downloads · 30 days
0
Access
Public
Updated Oct 10, 2026
Repo size
419 MB
Likes
0
Public
Click a slice to open those files.
.data419 MB · 99%
From the Hugging Face model README
An int4 ONNX export of HuggingFaceTB/SmolLM2-360M-Instruct for ONNX Runtime GenAI on the CPU execution provider.
All model weights and training are by the Hugging Face SmolLM team. This repo contains only a converted, quantized copy. It is not a new model and it was not fine-tuned.
Developers who want to try a small instruct model with ONNX Runtime GenAI on a plain CPU, without running the conversion themselves. It is a test artifact, not a model for production use.
genai_config.json is 8192.smollm2-360m-cpu-int4 in base model, int4 precision
and ORT CPU runtime. It is not the file xllama ships, so xllama's throughput figures do not
describe this repo.model.onnx + model.onnx.data (int4 weights), genai_config.json, tokenizer.json,
tokenizer_config.json, chat_template.jinja (ChatML).
pip install onnxruntime-genai huggingface_hub
hf download gianlucamazza/SmolLM2-360M-Instruct-ort-genai-int4-cpu --local-dir smollm2-int4
import onnxruntime_genai as og
model = og.Model("smollm2-int4")
tokenizer = og.Tokenizer(model)
prompt = "<|im_start|>user\nWhat is the capital of Italy?<|im_end|>\n<|im_start|>assistant\n"
params = og.GeneratorParams(model)
params.set_search_options(max_length=256)
generator = og.Generator(model, params)
generator.append_tokens(tokenizer.encode(prompt))
stream = tokenizer.create_stream()
while not generator.is_done():
generator.generate_next_token()
print(stream.decode(generator.get_next_tokens()[0]), end="", flush=True)
Apache-2.0, the same as the base model. Keep the base model's attribution when you redistribute.