Instructions to use ifx-pse-sys-ml/flame-27m-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ifx-pse-sys-ml/flame-27m-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ifx-pse-sys-ml/flame-27m-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/flame-27m-base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ifx-pse-sys-ml/flame-27m-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/flame-27m-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/flame-27m-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ifx-pse-sys-ml/flame-27m-base
- SGLang
How to use ifx-pse-sys-ml/flame-27m-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/flame-27m-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/flame-27m-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/flame-27m-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/flame-27m-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ifx-pse-sys-ml/flame-27m-base with Docker Model Runner:
docker model run hf.co/ifx-pse-sys-ml/flame-27m-base
flame-27m-base
A 27.1M-parameter English base language model, pretrained on curated educational web + synthetic textbooks + math. The largest of the ember/spark/flame family of deliberately tiny models for small-model research, fast experimentation, and as a lightweight decoder backbone. ~5ร smaller than SmolLM-135M.
- Architecture: Llama-style decoder โ hidden 512, 8 layers, 8 heads / 2 KV heads (GQA), intermediate 1280, RoPE (ฮธ=1e6), context 2048, vocab 12000 (English BPE).
- Pretraining: 300B tokens (~11,070 tokens/param), mixture FineWeb-Edu-dedup 0.44 / Cosmopedia-v2 0.24 / ClimbMix 0.16 / FineMath-3+ 0.10 / FineMath-4+ 0.06. Decontaminated against the eval benchmarks.
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("ifx-pse-sys-ml/flame-27m-base", trust_remote_code=True)
tok = AutoTokenizer.from_pretrained("ifx-pse-sys-ml/flame-27m-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. The tokenizer
keeps the Qwen2.5 multimodal special tokens (<|vision_start|> etc.) intact. 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 | flame-27m-base | SmolLM-135M |
|---|---|---|---|
| hellaswag | 25 | 30.7 | 42.6 |
| arc_easy | 25 | 40.8 | 56.1 |
| arc_challenge | 25 | 24.5 | 28.9 |
| piqa | 50 | 61.6 | 68.4 |
| winogrande | 50 | 51.5 | 53.2 |
| openbookqa | 25 | 29.0 | 34.0 |
| commonsense_qa | 20 | 19.5 | 19.8 |
| mmlu | 25 | 25.8 | 25.2 |
| average | โ | 35.4 | 41.0 |
flame reaches 35.4 avg at 1/5 the parameters of SmolLM-135M and edges it on MMLU (25.8 vs 25.2). On the neutral Wikipedia holdout its bits-per-byte (the tokenizer-fair metric) is 1.140, a 15% reduction over the 13M spark and 24% over the 6.5M ember โ the family's scaling curve is still steep at this size.
Honest limitations
At 27M parameters this model is near random chance on the hardest reasoning/knowledge benchmarks (ARC-Challenge, CommonsenseQA, most of MMLU). Generation is fluent and on-register but factually unreliable โ it models how educational text reads, not what is true. A research/prototyping model and a lightweight decoder, not a knowledge model. English only. Trained with the Nexus codebase.
- Downloads last month
- 142