Instructions to use ifx-pse-sys-ml/spark-13m-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ifx-pse-sys-ml/spark-13m-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ifx-pse-sys-ml/spark-13m-base", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ifx-pse-sys-ml/spark-13m-base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ifx-pse-sys-ml/spark-13m-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ifx-pse-sys-ml/spark-13m-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ifx-pse-sys-ml/spark-13m-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ifx-pse-sys-ml/spark-13m-base
- SGLang
How to use ifx-pse-sys-ml/spark-13m-base with 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-base" \ --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-base", "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-base" \ --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-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ifx-pse-sys-ml/spark-13m-base with Docker Model Runner:
docker model run hf.co/ifx-pse-sys-ml/spark-13m-base
spark-13m-base
A 13.2M-parameter English base language model, pretrained SmolLM-style on curated educational web + synthetic textbooks. A deliberately tiny model for small-model research, fast experimentation, and as a lightweight decoder backbone. ~10ร smaller than SmolLM-135M.
- Architecture: Llama-style decoder โ hidden 384, 6 layers, 6 heads / 2 KV heads (GQA), intermediate 1216, RoPE, context 512, vocab 6400 (English BPE).
- Pretraining: 100B tokens, mixture FineWeb-Edu-dedup 0.72 / Cosmopedia-v2 0.25 / TinyStories 0.03 (the SmolLM-corpus recipe). Decontaminated against the eval benchmarks.
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("ifx-pse-sys-ml/spark-13m-base", trust_remote_code=True)
tok = AutoTokenizer.from_pretrained("ifx-pse-sys-ml/spark-13m-base")
ids = tok("The moon is", return_tensors="pt").input_ids
out = model.generate(ids, max_new_tokens=40, do_sample=True, temperature=0.8, top_p=0.9)
print(tok.decode(out[0], skip_special_tokens=True))
It also accepts inputs_embeds (pass exactly one of input_ids / inputs_embeds), so a
vision projector can inject visual tokens โ 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-base | SmolLM-135M |
|---|---|---|---|
| hellaswag | 25 | 28.6 | 42.6 |
| arc_easy | 25 | 37.7 | 56.1 |
| arc_challenge | 25 | 25.2 | 28.9 |
| piqa | 50 | 58.8 | 68.4 |
| winogrande | 50 | 52.0 | 53.2 |
| openbookqa | 25 | 26.0 | 34.0 |
| commonsense_qa | 20 | 20.0 | 19.8 |
| mmlu | 25 | 23.2 | 25.2 |
| average | โ | 33.9 | 41.0 |
Honest limitations
At 13M parameters this model sits near random chance on knowledge/reasoning benchmarks (MMLU, OpenBookQA, ARC-Challenge). It is ~10ร smaller than SmolLM-135M and the gap is capacity, not data โ a research/prototyping model, not a knowledge model. English only. Trained with the Nexus codebase.
- Downloads last month
- 206