How to use from
SGLang
Install from pip and serve model
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
    --model-path "ifx-pse-sys-ml/spark-13m-instruct" \
    --host 0.0.0.0 \
    --port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "ifx-pse-sys-ml/spark-13m-instruct",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Use Docker images
docker run --gpus all \
    --shm-size 32g \
    -p 30000:30000 \
    -v ~/.cache/huggingface:/root/.cache/huggingface \
    --env "HF_TOKEN=<secret>" \
    --ipc=host \
    lmsysorg/sglang:latest \
    python3 -m sglang.launch_server \
        --model-path "ifx-pse-sys-ml/spark-13m-instruct" \
        --host 0.0.0.0 \
        --port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "ifx-pse-sys-ml/spark-13m-instruct",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Quick Links

spark-13m-instruct

A 13.2M-parameter English instruction-tuned model: spark-13m-base (pretrained SmolLM-style on FineWeb-Edu-dedup + Cosmopedia-v2) fine-tuned on SmolTalk. ~10Γ— smaller than SmolLM-135M-Instruct.

  • Architecture: Llama-style decoder β€” hidden 384, 6 layers, 6 heads / 2 KV heads (GQA), intermediate 1216, RoPE, context 1024, vocab 6400 (English BPE).
  • Training: base β†’ SmolTalk SFT (200k conversations, 5 epochs).

Usage (chat)

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("ifx-pse-sys-ml/spark-13m-instruct", trust_remote_code=True)
tok = AutoTokenizer.from_pretrained("ifx-pse-sys-ml/spark-13m-instruct")

messages = [{"role": "user", "content": "Tell me about the moon in one sentence."}]
ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
out = model.generate(ids, max_new_tokens=64, do_sample=True, temperature=0.7, top_p=0.9)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))

The decoder also accepts inputs_embeds (exactly one of input_ids / inputs_embeds), so a vision projector can splice visual tokens in β€” usable as a small VLM text backbone. A raw PyTorch checkpoint (pytorch_model.pth) is included alongside the safetensors weights.

Benchmarks

Accuracy (%) via lm-evaluation-harness 0.4, same harness and shots for every model, so columns are directly comparable.

Benchmark chance spark-13m-instruct SmolLM-135M-Instruct
hellaswag 25 27.9 41.9
arc_easy 25 34.3 43.9
arc_challenge 25 24.3 27.4
piqa 50 57.7 67.0
winogrande 50 50.4 51.3
openbookqa 25 24.8 33.6
commonsense_qa 20 21.0 20.3
mmlu 25 24.6 24.4
average β€” 33.1 38.7

Honest limitations

At 13M parameters this is near random chance on knowledge/reasoning benchmarks; the gap to SmolLM-135M is capacity, not data or tuning. Instruction-tuning adds response format, not facts (academic benchmarks are ~flat vs the base). A research/prototyping instruct model and a lightweight decoder, not a knowledge model. English only. Trained with the Nexus codebase.

Downloads last month
22
Safetensors
Model size
13.2M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support