HuggingFaceTB/smol-smoltalk
Viewer • Updated • 485k • 13.2k • 122
Surjo-50M-SFT-Only is the instruction-tuned checkpoint of Surjo-50M, fine-tuned for basic dialogue and instruction-following tasks.
| Attribute | Specification |
|---|---|
| Base Model | SurjoLabs/Surjo-50m (53.8M parameters) |
| Architecture | Hybrid GDN-2 + XSA (10 physical / 18 effective layers) |
| Training Data | 1 epoch of HuggingFaceTB/smol-smoltalk |
| Context Window | 2048 tokens |
| License | Apache 2.0 |
pip install torch transformers accelerate
pip install -U git+https://github.com/fla-org/flash-linear-attention
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "SurjoLabs/Surjo-50m-SFT-Only"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
device_map="auto",
trust_remote_code=True,
)
messages = [
{"role": "user", "content": "Explain what a neural network is in two sentences."}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
with torch.no_grad():
outputs = model.generate(
inputs,
max_new_tokens=128,
do_sample=True,
temperature=0.7,
top_p=0.9,
)
response = tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True)
print(response)
Licensed under the Apache 2.0 License.
Base model
SurjoLabs/Surjo-50m