TheBlueObserver/SmolLM2-1.7B-Instruct-MLX
By TheBlueObserver · ↓ 8 · ♥ 0 · Updated 2024-12-19
What's in this repo
This page lists the files in TheBlueObserver/SmolLM2-1.7B-Instruct-MLX.
- No .onnx files in this repository
- 10 files, including 6 .json, 1 .md, 1 .txt, 1 .safetensors
- Last updated 2024-12-19
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
The Model TheBlueObserver/SmolLM2-1.7B-Instruct-MLX 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")
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:finetune:HuggingFaceTB/SmolLM2-1.7B-Instruct
license:apache-2.0
↓ 8
♥ 0
Created: 2024-12-19
Updated: 2024-12-19
View on Hugging FaceFiles (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