Text Generation
Transformers
Safetensors
English
pyralm
causal-lm
custom-architecture
custom_code
slm
small-language-model
open-slm-leaderboard
Eval Results (legacy)
Run this model with HF Jobs
Run Lazyshu/PyraLM-10M on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Lazyshu/PyraLM-10M. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Lazyshu/PyraLM-10M on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Lazyshu/PyraLM-10M. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Lazyshu/PyraLM-10M. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Lazyshu/PyraLM-10M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lazyshu/PyraLM-10M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Lazyshu/PyraLM-10M", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Lazyshu/PyraLM-10M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Lazyshu/PyraLM-10M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lazyshu/PyraLM-10M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lazyshu/PyraLM-10M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Lazyshu/PyraLM-10M
- SGLang
How to use Lazyshu/PyraLM-10M 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 "Lazyshu/PyraLM-10M" \ --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": "Lazyshu/PyraLM-10M", "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 "Lazyshu/PyraLM-10M" \ --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": "Lazyshu/PyraLM-10M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Lazyshu/PyraLM-10M with Docker Model Runner:
docker model run hf.co/Lazyshu/PyraLM-10M
Add PyraLM model family and shared evaluation overview
Browse filesFiles changed (4)
4 unmodified lines567891089 unmodified lines1001011021031041052 unmodified lines10810911011111211330 unmodified lines1441451461471481494 unmodified lineslibrary_name: transformerspipeline_tag: text-generationtags:- text-generation- causal-lm- custom-architecture89 unmodified lines[English](README.md) | [简体中文](README_zh.md)> **BETU leaderboard update (2026-12-04):** PyraLM-10M ranks **#1 in the `<10M` category** of the [BETU SLM Leaderboard](https://huggingface.co/spaces/BananaMind/BETU-SLM-Leaderboard), with **Overall Index 22.64** and **Quality 20.28** ([accepted submission](https://huggingface.co/spaces/BananaMind/BETU-SLM-Leaderboard/discussions/35)). BETU combines six benchmarks; its Overall Index is a separate metric from the Open SLM Intelligence Index below.> **Open SLM Leaderboard update (2026-12-05):** Officially verified and listed on the [Open SLM Leaderboard](https://huggingface.co/spaces/AxiomicLabs/Open_SLM_Leaderboard) ([submission #359](https://huggingface.co/spaces/AxiomicLabs/Open_SLM_Leaderboard/discussions/359)): **Official Int Index 9.59 under the ArithMark-4 formula**, ranking **#3 overall in `<10M`** as of that date, with **30.06% on ArithMark-4 (#1 in `<10M`)** and **57.90% on ArithMark-3**.2 unmodified linesThis release is a **genuine single-trajectory training checkpoint** (no model merging, no model soups, no SWA/EMA), officially verified on the Open SLM Leaderboard with an **Intelligence Index of `9.59` under the current ArithMark-4 formula**.---## Model Overview30 unmodified lines*Multi-seed note:* The three independent Stage 2 seeds start from the same 20B pretrained base. Their individual-benchmark means above are local results; the official AM4 score applies only to the released seed-31 checkpoint.---## Training Summary & Contamination Control4 unmodified lines56789101189 unmodified lines1011021031041051061071081091101111121131142 unmodified lines11711811912012112212312412512630 unmodified lines1571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881894 unmodified lineslibrary_name: transformerspipeline_tag: text-generationtags:- pyralm- text-generation- causal-lm- custom-architecture89 unmodified lines[English](README.md) | [简体中文](README_zh.md)**[PyraLM family](https://huggingface.co/collections/Lazyshu/pyralm-6b1511eb1966063404be1688):**| Model | Role | Hugging Face | ModelScope ||---|---|---|---|| **PyraLM-10M** | Original, 18-layer tapered model | [HF](https://huggingface.co/Lazyshu/PyraLM-10M) | [MS](https://modelscope.cn/models/Lazyshu/PyraLM-10M) || PyraLM-10M-v2 | Latest <10M, 12 layers | [HF](https://huggingface.co/Lazyshu/PyraLM-10M-v2) | [MS](https://modelscope.cn/models/Lazyshu/PyraLM-10M-v2) || PyraLM-50M | Larger capacity, 20 layers | [HF](https://huggingface.co/Lazyshu/PyraLM-50M) | [MS](https://modelscope.cn/models/Lazyshu/PyraLM-50M) |> **BETU leaderboard update (2026-12-04):** PyraLM-10M ranks **#1 in the `<10M` category** of the [BETU SLM Leaderboard](https://huggingface.co/spaces/BananaMind/BETU-SLM-Leaderboard), with **Overall Index 22.64** and **Quality 20.28** ([accepted submission](https://huggingface.co/spaces/BananaMind/BETU-SLM-Leaderboard/discussions/35)). BETU combines six benchmarks; its Overall Index is a separate metric from the Open SLM Intelligence Index below.> **Open SLM Leaderboard update (2026-12-05):** Officially verified and listed on the [Open SLM Leaderboard](https://huggingface.co/spaces/AxiomicLabs/Open_SLM_Leaderboard) ([submission #359](https://huggingface.co/spaces/AxiomicLabs/Open_SLM_Leaderboard/discussions/359)): **Official Int Index 9.59 under the ArithMark-4 formula**, ranking **#3 overall in `<10M`** as of that date, with **30.06% on ArithMark-4 (#1 in `<10M`)** and **57.90% on ArithMark-3**.2 unmodified linesThis release is a **genuine single-trajectory training checkpoint** (no model merging, no model soups, no SWA/EMA), officially verified on the Open SLM Leaderboard with an **Intelligence Index of `9.59` under the current ArithMark-4 formula**.Local comparison of the released PyraLM models. Official ArithMark-4 results are reported separately below.---## Model Overview30 unmodified lines*Multi-seed note:* The three independent Stage 2 seeds start from the same 20B pretrained base. Their individual-benchmark means above are local results; the official AM4 score applies only to the released seed-31 checkpoint.### Additional Local Evaluations: PyraLM FamilyThe table compares the three **released checkpoints** on the same fixed text and task subsets. PyraLM-10M-v1 denotes the original [PyraLM-10M release](https://huggingface.co/Lazyshu/PyraLM-10M). These are local evaluations; the table specifies the evaluated subsets.| Benchmark | Items / text size | PyraLM-10M-v1 | PyraLM-10M-v2 | PyraLM-50M ||---|---:|---:|---:|---:|| WikiText-2 — language modeling (byte PPL ↓) | 1,292,008 bytes | 2.9075 | 2.8282 | **2.3925** || LAMBADA — contextual word prediction | 5,153 | 23.56 | 25.54 | **34.74** || SWAG — commonsense continuation | 2,000 | 33.55 | 34.70 | **41.95** || RACE-Middle — reading comprehension | 1,311 | 32.88 | 33.79 | **41.27** || RACE-High — reading comprehension | 1,500 | 28.33 | 27.60 | **32.13** || BoolQ — yes/no reading comprehension | 2,195 | 46.97 | 57.86 | **60.05** || OpenBookQA — elementary science | 454 | 26.21 | 27.75 | **34.58** || SciQ — science knowledge | 993 | 51.96 | 57.40 | **72.51** || Quartz — qualitative reasoning with a passage | 784 | 51.40 | 52.55 | **56.63** || COPA — causal commonsense | 100 | 55.00 | 55.00 | **64.00** || WinoGrande — pronoun resolution | 1,267 | **49.96** | 49.57 | 49.72 || RTE — textual entailment | 272 | 48.16 | **51.84** | 51.10 || WiC — word sense in context | 635 | **50.24** | 45.20 | 49.61 || CB — textual entailment | 48 | **56.25** | 54.17 | 43.75 |Accuracy is reported in percent. FP32, TF32 off, no BOS, context 512. SWAG, RACE, BoolQ, RTE, WiC and CB use summed continuation log-likelihood; OpenBookQA, SciQ, Quartz, COPA and WinoGrande use character-normalized scores; LAMBADA uses exact next-word completion. BoolQ includes 54 context-truncated candidates for 10M-v1 and 18 for 50M. SciQ uses a test subset; its training split is included in SFT.WikiText-2 uses the same raw text and 256-token prediction windows. **Byte PPL = exp(total NLL / UTF-8 bytes)** is reported across different tokenizers; token-level PPL is not compared directly.---## Training Summary & Contamination Control
1 unmodified line2345672 unmodified lines10111213141530 unmodified lines4647484950511 unmodified line[English](README.md) | [简体中文](README_zh.md)> **BETU 榜单更新(2026-12-04):** PyraLM-10M 在 [BETU SLM Leaderboard](https://huggingface.co/spaces/BananaMind/BETU-SLM-Leaderboard) 的 **`<10M` 类别排名第一**,**Overall Index 22.64,Quality 20.28**([提交已合并](https://huggingface.co/spaces/BananaMind/BETU-SLM-Leaderboard/discussions/35))。BETU 汇总六项测评,其 Overall Index 与下文 Open SLM 的 Intelligence Index 为不同指标。> **Open SLM 官方验证更新(2026-12-05):** PyraLM-10M 已通过独立评测并收录于 [Open SLM Leaderboard](https://huggingface.co/spaces/AxiomicLabs/Open_SLM_Leaderboard)([提交 #359](https://huggingface.co/spaces/AxiomicLabs/Open_SLM_Leaderboard/discussions/359))。新 ArithMark-4 公式下 **Official Int Index 为 9.59**,截至当日位列 **`<10M` 总榜第 3**;**ArithMark-4 为 30.06%(`<10M` 第 1)**,**ArithMark-3 官方成绩为 57.90%**。2 unmodified lines本次发布的权重为**真实单轨迹训练检查点**(无模型合并、无 Model Soup、无 SWA/EMA),已获 Open SLM Leaderboard 官方验证,新 ArithMark-4 公式下 **Intelligence Index = `9.59`**。---## 模型概览30 unmodified lines*多 seed 说明:* 三个独立第二阶段随机种子从同一 20B 预训练底座出发;上表均值为本地分项结果,官方 AM4 成绩仅对应已发布的 seed 31 权重。---## 训练流程与防污染说明1 unmodified line234567891011121314152 unmodified lines1819202122232425262730 unmodified lines5859606162636465666768697071727374757677787980818283848586878889901 unmodified line[English](README.md) | [简体中文](README_zh.md)**[PyraLM 系列](https://huggingface.co/collections/Lazyshu/pyralm-6b1511eb1966063404be1688):**| 模型 | 定位 | Hugging Face | ModelScope ||---|---|---|---|| **PyraLM-10M** | 初代,18 层锥形结构 | [HF](https://huggingface.co/Lazyshu/PyraLM-10M) | [MS](https://modelscope.cn/models/Lazyshu/PyraLM-10M) || PyraLM-10M-v2 | 新一代 <10M,12 层结构 | [HF](https://huggingface.co/Lazyshu/PyraLM-10M-v2) | [MS](https://modelscope.cn/models/Lazyshu/PyraLM-10M-v2) || PyraLM-50M | 更大容量,20 层结构 | [HF](https://huggingface.co/Lazyshu/PyraLM-50M) | [MS](https://modelscope.cn/models/Lazyshu/PyraLM-50M) |> **BETU 榜单更新(2026-12-04):** PyraLM-10M 在 [BETU SLM Leaderboard](https://huggingface.co/spaces/BananaMind/BETU-SLM-Leaderboard) 的 **`<10M` 类别排名第一**,**Overall Index 22.64,Quality 20.28**([提交已合并](https://huggingface.co/spaces/BananaMind/BETU-SLM-Leaderboard/discussions/35))。BETU 汇总六项测评,其 Overall Index 与下文 Open SLM 的 Intelligence Index 为不同指标。> **Open SLM 官方验证更新(2026-12-05):** PyraLM-10M 已通过独立评测并收录于 [Open SLM Leaderboard](https://huggingface.co/spaces/AxiomicLabs/Open_SLM_Leaderboard)([提交 #359](https://huggingface.co/spaces/AxiomicLabs/Open_SLM_Leaderboard/discussions/359))。新 ArithMark-4 公式下 **Official Int Index 为 9.59**,截至当日位列 **`<10M` 总榜第 3**;**ArithMark-4 为 30.06%(`<10M` 第 1)**,**ArithMark-3 官方成绩为 57.90%**。2 unmodified lines本次发布的权重为**真实单轨迹训练检查点**(无模型合并、无 Model Soup、无 SWA/EMA),已获 Open SLM Leaderboard 官方验证,新 ArithMark-4 公式下 **Intelligence Index = `9.59`**。三款 PyraLM 发布模型的本地同口径对比;官方 ArithMark-4 成绩见下表。---## 模型概览30 unmodified lines*多 seed 说明:* 三个独立第二阶段随机种子从同一 20B 预训练底座出发;上表均值为本地分项结果,官方 AM4 成绩仅对应已发布的 seed 31 权重。### 其他本地评测:PyraLM 系列下表使用相同的固定文本与任务子集,对比三款**已发布权重**。PyraLM-10M-v1 指最初发布的 [PyraLM-10M](https://huggingface.co/Lazyshu/PyraLM-10M)。这些是本地评测成绩,表中列出实际评测规模。| 评测基准 | 样本数 / 文本量 | PyraLM-10M-v1 | PyraLM-10M-v2 | PyraLM-50M ||---|---:|---:|---:|---:|| WikiText-2:语言建模(byte PPL ↓) | 1,292,008 bytes | 2.9075 | 2.8282 | **2.3925** || LAMBADA:上下文词预测 | 5,153 | 23.56 | 25.54 | **34.74** || SWAG:常识续写 | 2,000 | 33.55 | 34.70 | **41.95** || RACE-Middle:初中阅读理解 | 1,311 | 32.88 | 33.79 | **41.27** || RACE-High:高中阅读理解 | 1,500 | 28.33 | 27.60 | **32.13** || BoolQ:是非阅读理解 | 2,195 | 46.97 | 57.86 | **60.05** || OpenBookQA:基础科学 | 454 | 26.21 | 27.75 | **34.58** || SciQ:科学知识 | 993 | 51.96 | 57.40 | **72.51** || Quartz:有段落的定性推理 | 784 | 51.40 | 52.55 | **56.63** || COPA:因果常识 | 100 | 55.00 | 55.00 | **64.00** || WinoGrande:代词消歧 | 1,267 | **49.96** | 49.57 | 49.72 || RTE:文本蕴含 | 272 | 48.16 | **51.84** | 51.10 || WiC:词义辨析 | 635 | **50.24** | 45.20 | 49.61 || CB:文本蕴含 | 48 | **56.25** | 54.17 | 43.75 |准确率单位为百分比。采用 FP32、TF32 off、无 BOS、512 上下文。SWAG、RACE、BoolQ、RTE、WiC、CB 按续写总对数似然计分;OpenBookQA、SciQ、Quartz、COPA、WinoGrande 使用字符长度归一化;LAMBADA 使用下一个词的精确生成匹配。BoolQ 中,10M-v1 有 54 个候选发生上下文截断,50M 为 18 个。SciQ 使用 test 子集,其 train split 已用于 SFT。WikiText-2 使用相同原文、每窗口预测 256 个 token。不同词表之间使用 **Byte PPL = exp(总 NLL / UTF-8 字节数)** 比较;token 级 PPL 不直接横比。---## 训练流程与防污染说明
README.md+40
README_zh.md+39
assets/pyralm-family-language-quality.svgAdded
assets/pyralm-family-public-benchmarks.svgAdded