ONNX Model Zoo

TheBlueObserver/SmolLM2-1.7B-Instruct-MLX-8777b

By TheBlueObserver · ↓ 4 · ♥ 0 · Updated 2024-12-20

What's in this repo

This page lists the files in TheBlueObserver/SmolLM2-1.7B-Instruct-MLX-8777b.

  • No .onnx files in this repository
  • 10 files, including 6 .json, 1 .md, 1 .txt, 1 .safetensors
  • Last updated 2024-12-20

ONNX files

This repository has no .onnx files. See the full file list on the right for other formats.

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

TheBlueObserver/SmolLM2-1.7B-Instruct-MLX-8777b

The Model TheBlueObserver/SmolLM2-1.7B-Instruct-MLX-8777b was converted to MLX format from HuggingFaceTB/SmolLM2-1.7B-Instruct using mlx-lm version 0.20.2.

Use with mlx

pip install mlx-lm
from mlx_lm import load, generate

model, tokenizer = load("TheBlueObserver/SmolLM2-1.7B-Instruct-MLX-8777b")

prompt="hello"

if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
    messages = [{"role": "user", "content": prompt}]
    prompt = tokenizer.apply_chat_template(
        messages, tokenize=False, add_generation_prompt=True
    )

response = generate(model, tokenizer, prompt=prompt, verbose=True)

Model info

text-generation transformers
transformers safetensors llama text-generation onnx transformers.js mlx conversational en base_model:HuggingFaceTB/SmolLM2-1.7B-Instruct base_model:quantized:HuggingFaceTB/SmolLM2-1.7B-Instruct license:apache-2.0
↓ 4 ♥ 0

Created: 2024-12-20

Updated: 2024-12-20

View on Hugging Face

Files (10)

.gitattributes
README.md
config.json
merges.txt
model.safetensors
model.safetensors.index.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json

Related models