language:
Spark is a highly efficient, ultra-small language model developed by SurjoLabs. It demonstrates that aggressive overtraining on high-quality data combined with a custom XSA recurrent architecture can yield exceptional reasoning capabilities in tiny architectures.
Spark is built to prove that unique recurrent architectures can match or beat standard transformers even at the smallest scales.
| Benchmark | Score (acc_norm) |
|---|---|
| HellaSwag | 28.17% |
| ARC-Easy | 35.02% |
| ARC-Challenge | 20.99% |
| PIQA | 55.55% |
| ArithMark-3 | 36.10% |
| Intelligence Index | 7.93 |
The model was trained for 20,000 steps, but evaluation showed that the checkpoint at step 19,000 performed better on nearly all benchmarks. The final step (20,000) was discarded, and step 19,000 is the version hosted in the root of this repository.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "SurjoLabs/Spark"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
torch_dtype=torch.bfloat16
).cuda()
prompt = "The capital of France is"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=20)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
We would like to thank AxiomicLabs for proving that XSA architecture is excellent for token efficiency.
This is an early test of the larger Surjo Project. The code is not very stable and we do not recommend using the modeling file without doing edits for training your own model.
checkpoint-1000/model.safetensors 28 MBcheckpoint-10000/model.safetensors 28 MBcheckpoint-10500/model.safetensors 28 MBcheckpoint-11000/model.safetensors 28 MBcheckpoint-11500/model.safetensors 28 MBcheckpoint-12000/model.safetensors 28 MBcheckpoint-12500/model.safetensors 28 MBcheckpoint-13000/model.safetensors 28 MBcheckpoint-13500/model.safetensors 28 MBcheckpoint-14000/model.safetensors 28 MBcheckpoint-14500/model.safetensors 28 MBcheckpoint-1500/model.safetensors 28 MBcheckpoint-15000/model.safetensors 28 MBcheckpoint-15500/model.safetensors 28 MBcheckpoint-16000/model.safetensors 28 MBcheckpoint-16500/model.safetensors 28 MBcheckpoint-17000/model.safetensors 28 MBcheckpoint-17500/model.safetensors 28 MBcheckpoint-18000/model.safetensors 28 MBcheckpoint-18500/model.safetensors 28 MBcheckpoint-19000/model.safetensors 28 MBcheckpoint-19500/model.safetensors 28 MBcheckpoint-2000/model.safetensors 28 MBcheckpoint-2500/model.safetensors 28 MBcheckpoint-3000/model.safetensors 28 MBcheckpoint-3500/model.safetensors 28 MBcheckpoint-4000/model.safetensors 28 MBcheckpoint-4500/model.safetensors 28 MBcheckpoint-500/model.safetensors 28 MBcheckpoint-5000/model.safetensors 28 MBcheckpoint-5500/model.safetensors 28 MBcheckpoint-6000/model.safetensors 28 MBcheckpoint-6500/model.safetensors 28 MBcheckpoint-7000/model.safetensors 28 MBcheckpoint-7500/model.safetensors 28 MBcheckpoint-8000/model.safetensors 28 MBcheckpoint-8500/model.safetensors 28 MBcheckpoint-9000/model.safetensors 28 MBcheckpoint-9500/model.safetensors 28 MBmodel.safetensors 28 MBcheckpoint-1000/optimizer.bin 24 MBcheckpoint-10000/optimizer.bin 24 MBcheckpoint-10500/optimizer.bin 24 MBcheckpoint-11000/optimizer.bin 24 MBcheckpoint-11500/optimizer.bin 24 MBcheckpoint-12000/optimizer.bin 24 MBcheckpoint-12500/optimizer.bin 24 MBcheckpoint-13000/optimizer.bin 24 MBcheckpoint-13500/optimizer.bin 24 MBcheckpoint-14000/optimizer.bin 24 MBcheckpoint-14500/optimizer.bin 24 MBcheckpoint-1500/optimizer.bin 24 MBcheckpoint-15000/optimizer.bin 24 MBcheckpoint-15500/optimizer.bin 24 MBcheckpoint-16000/optimizer.bin 24 MBcheckpoint-16500/optimizer.bin 24 MBcheckpoint-17000/optimizer.bin 24 MBcheckpoint-17500/optimizer.bin 24 MBcheckpoint-18000/optimizer.bin 24 MBcheckpoint-18500/optimizer.bin 24 MBcheckpoint-19000/optimizer.bin 24 MBcheckpoint-19500/optimizer.bin 24 MBcheckpoint-2000/optimizer.bin 24 MBcheckpoint-2500/optimizer.bin 24 MBcheckpoint-3000/optimizer.bin 24 MBcheckpoint-3500/optimizer.bin 24 MBcheckpoint-4000/optimizer.bin 24 MBcheckpoint-4500/optimizer.bin 24 MBcheckpoint-500/optimizer.bin 24 MBcheckpoint-5000/optimizer.bin 24 MBcheckpoint-5500/optimizer.bin 24 MBcheckpoint-6000/optimizer.bin 24 MBcheckpoint-6500/optimizer.bin 24 MBcheckpoint-7000/optimizer.bin 24 MBcheckpoint-7500/optimizer.bin 24 MBcheckpoint-8000/optimizer.bin 24 MBcheckpoint-8500/optimizer.bin 24 MBcheckpoint-9000/optimizer.bin 24 MBcheckpoint-9500/optimizer.bin 24 MBoptimizer.bin 24 MBcheckpoint-1000/optimizer_1.bin 8 MBcheckpoint-10000/optimizer_1.bin 8 MBcheckpoint-10500/optimizer_1.bin 8 MBcheckpoint-11000/optimizer_1.bin 8 MBcheckpoint-11500/optimizer_1.bin 8 MBcheckpoint-12000/optimizer_1.bin 8 MBcheckpoint-12500/optimizer_1.bin 8 MBcheckpoint-13000/optimizer_1.bin 8 MBcheckpoint-13500/optimizer_1.bin 8 MBcheckpoint-14000/optimizer_1.bin 8 MBcheckpoint-14500/optimizer_1.bin 8 MBcheckpoint-1500/optimizer_1.bin 8 MBcheckpoint-15000/optimizer_1.bin 8 MBcheckpoint-15500/optimizer_1.bin 8 MBcheckpoint-16000/optimizer_1.bin 8 MBcheckpoint-16500/optimizer_1.bin 8 MBcheckpoint-17000/optimizer_1.bin 8 MBcheckpoint-17500/optimizer_1.bin 8 MBcheckpoint-18000/optimizer_1.bin 8 MBcheckpoint-18500/optimizer_1.bin 8 MBcheckpoint-19000/optimizer_1.bin 8 MBcheckpoint-19500/optimizer_1.bin 8 MBcheckpoint-2000/optimizer_1.bin 8 MBcheckpoint-2500/optimizer_1.bin 8 MBcheckpoint-3000/optimizer_1.bin 8 MBcheckpoint-3500/optimizer_1.bin 8 MBcheckpoint-4000/optimizer_1.bin 8 MBcheckpoint-4500/optimizer_1.bin 8 MBcheckpoint-500/optimizer_1.bin 8 MBcheckpoint-5000/optimizer_1.bin 8 MBcheckpoint-5500/optimizer_1.bin 8 MBcheckpoint-6000/optimizer_1.bin 8 MBcheckpoint-6500/optimizer_1.bin 8 MBcheckpoint-7000/optimizer_1.bin 8 MBcheckpoint-7500/optimizer_1.bin 8 MBcheckpoint-8000/optimizer_1.bin 8 MBcheckpoint-8500/optimizer_1.bin 8 MBcheckpoint-9000/optimizer_1.bin 8 MBcheckpoint-9500/optimizer_1.bin 8 MBoptimizer_1.bin 8 MB