Instructions to use Gary-69/Elena-1.6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gary-69/Elena-1.6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Gary-69/Elena-1.6", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Gary-69/Elena-1.6", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Gary-69/Elena-1.6 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Gary-69/Elena-1.6" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gary-69/Elena-1.6", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Gary-69/Elena-1.6
- SGLang
How to use Gary-69/Elena-1.6 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 "Gary-69/Elena-1.6" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gary-69/Elena-1.6", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Gary-69/Elena-1.6" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gary-69/Elena-1.6", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Gary-69/Elena-1.6 with Docker Model Runner:
docker model run hf.co/Gary-69/Elena-1.6
Elena-1.6
Elena-1.6 is a 2.95M-parameter language model (2,946,245 parameters, under 3M), pretrained from scratch.
Results (zero-shot)
| Benchmark | Metric | Score |
|---|---|---|
| HellaSwag | acc_norm | 27.91 |
| ARC-Easy | acc_norm | 34.51 |
| ARC-Challenge | acc_norm | 21.25 |
| PIQA | acc_norm | 55.01 |
| ArithMark-3 | acc_norm (official bencharithmark-3.py) |
49.0 |
| Open SLM Intelligence Index | 10.56 |
HellaSwag, ARC and PIQA come from lm-evaluation-harness 0.4.13, zero-shot, float32, batch size 32. ArithMark-3 comes from the official script with its default settings (bfloat16, batch 32).
Architecture
Elena is a looped transformer. It stores 3 transformer blocks and runs all of them 5 times, which gives 15 effective layers for the parameters of 3.
- Width 272, 4 attention heads, SwiGLU feed-forward (704), RMSNorm, rotary position embeddings, context 512.
- Each pass adds a learned loop embedding and a gated re-injection of the input.
- Factorized, tied embeddings: vocab 2048 → 128 → 272.
- Units-first numbers. Every digit is its own token, and digit runs are written in reverse ("1234" → "4321") so the model produces the ones digit first, carries included. The bundled tokenizer does this automatically, so you pass normal text.
Training
- Optimizer: Muon for the hidden matrices and AdamW for everything else, with a warmup–stable–decay schedule and bf16 mixed precision, on one RTX 4070.
- Stage 1 (Elena-1.2): 8B tokens from scratch, 4 loops.
- Educational web text: FineWeb-Edu.
- Math text: FineMath and Cosmopedia auto-math.
- Cosmopedia WikiHow, stories and textbooks.
- Math Q&A: Orca-Math, MetaMathQA, AQuA-RAT, SVAMP, MAWPS and the GSM8K train split.
- Python-generated arithmetic practice.
- Word problems written as templates by a local LLM, with every answer computed by Python.
- Stage 2: 3B more tokens.
- 30% ClimbMix (a sample of OptimalScale's detokenized copy of nvidia/ClimbMix).
- The rest mostly Cosmopedia-v2 (SmolLM corpus), plus FineWeb-Edu documents with educational score ≥ 4 and the SciQ train split, alongside the stage-1 math and arithmetic sources.
- Stage 3 (loop-up and heal): the shared blocks went from 4 passes to 5. The new pass started from the last pass's loop embedding and gate, adding 273 parameters. The model was then trained for 300M more tokens with the stage-2 mix at a low learning rate.
- Benchmark decontamination. Every training document was checked against all splits (train, validation and test) of HellaSwag, ARC-Easy, ARC-Challenge, PIQA, LAMBADA and ArithMark-3. Any document sharing a 13-word sequence with any of them was removed: 4,592 documents in total. No benchmark data of any split was trained on.
- No ArithMark template fitting. Arithmetic skill was checked during training on problems with held-out wordings that never appear in training, not on ArithMark.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Gary-69/Elena-1.6"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True)
ids = tok("To keep bread fresh, you should", return_tensors="pt")
print(tok.decode(model.generate(**ids, max_new_tokens=30, do_sample=False)[0]))
trust_remote_code=True is required for the custom looped architecture and the units-first-digits tokenizer.
Limitations
At under 3M parameters, Elena's knowledge is very limited. It often produces fluent but wrong text, and it shouldn't be relied on for facts or advice.
- Downloads last month
- -