ONNX 模型库
返回模型

说明文档

TheBlueObserver/SmolLM2-135M-Instruct-MLX-104ce

该模型 TheBlueObserver/SmolLM2-135M-Instruct-MLX-104ce 是由 HuggingFaceTB/SmolLM2-135M-Instruct 使用 mlx-lm 版本 0.20.2 转换为 MLX 格式的。

使用 mlx

pip install mlx-lm
from mlx_lm import load, generate

model, tokenizer = load("TheBlueObserver/SmolLM2-135M-Instruct-MLX-104ce")

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)

TheBlueObserver/SmolLM2-135M-Instruct-MLX-104ce

作者 TheBlueObserver

text-generation transformers
↓ 1 ♥ 0

创建时间: 2024-12-19 22:33:00+00:00

更新时间: 2024-12-19 22:33:08+00:00

在 Hugging Face 上查看

文件 (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