How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="sercand/SmolLM2-135M-Instruct")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("sercand/SmolLM2-135M-Instruct")
model = AutoModelForCausalLM.from_pretrained("sercand/SmolLM2-135M-Instruct", device_map="auto")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

SmolLM2-135M-Instruct (decision model)

Fine-tuned from unsloth/SmolLM2-135M-Instruct (QLoRA, 3 epochs) with a Clef-style joint decision head (held-out accuracy 0.8715, ECE 0.0284; see unsloth_decision_config.json).

  • model.safetensors, joint_head.safetensors, joint_head_config.json: full bf16 checkpoint.
  • SmolLM2-135M-Instruct-clef-Q8_0.gguf: backbone and head in one GGUF, architecture name clef, produced by convert_clef_llama.py.
    • Backbone is a stock Llama (q/k kept in the half-split rotary layout (not llama.cpp's permuted one)). Tied embeddings: there is no output.weight, use token_embd.weight.
    • Large linears are Q8_0. Norms, biases, token_types, decision.scorer_out and decision.scales stay F32.
    • Head tensors use the dec.blk.N / decision.* layout of llama.cpp's conversion/clef.py.
    • Not loadable by llama.cpp: its clef arch assumes a Qwen3.5 backbone. Intended for the shiso engine.
Downloads last month
51
Safetensors
Model size
0.1B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for sercand/SmolLM2-135M-Instruct