CoolFace
Modelpublic

sidcraftscode/smollm2-1.7b-distilled-gpt-oss-20b

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
3likes18downloads
Model Card

SmolLM2-1.7B Distilled from GPT-OSS-20B

This model is a distilled version of SmolLM2-1.7B-Instruct that was trained using knowledge distillation from OpenAI's gpt-oss-20b.

Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("sidcraftscode/smollm2-1.7b-distilled-gpt-oss-20b")
tokenizer = AutoTokenizer.from_pretrained("sidcraftscode/smollm2-1.7b-distilled-gpt-oss-20b")

messages = [{"role": "user", "content": "Explain quantum computing"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt")

outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.7)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)