Text Generation
Transformers
Safetensors
English
Chinese
qwen3
haidass
npu
bilingual
mindspeed-llm
conversational
text-generation-inference
Instructions to use DALabCommunity/Haidass-143M-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DALabCommunity/Haidass-143M-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DALabCommunity/Haidass-143M-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DALabCommunity/Haidass-143M-v1") model = AutoModelForCausalLM.from_pretrained("DALabCommunity/Haidass-143M-v1", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DALabCommunity/Haidass-143M-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DALabCommunity/Haidass-143M-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DALabCommunity/Haidass-143M-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DALabCommunity/Haidass-143M-v1
- SGLang
How to use DALabCommunity/Haidass-143M-v1 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 "DALabCommunity/Haidass-143M-v1" \ --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": "DALabCommunity/Haidass-143M-v1", "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 "DALabCommunity/Haidass-143M-v1" \ --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": "DALabCommunity/Haidass-143M-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DALabCommunity/Haidass-143M-v1 with Docker Model Runner:
docker model run hf.co/DALabCommunity/Haidass-143M-v1
File size: 3,132 Bytes
c55c02b 0989f64 8956a8b 0989f64 c55c02b ebd28a7 c55c02b ebd28a7 c55c02b ebd28a7 c55c02b ebd28a7 c55c02b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
<div align="center">
<img src="logo.png" width="400"/>
</div>
# Haidass-143M
<p align="center">
<a href="https://huggingface.co/DALabCommunity/Haidass-143M-v1/blob/main/README.md">English</a> |
中文
</p>
中英双语小语言模型,在**华为昇腾**生态上进行全流程训练。
## 模型简介
Haidass-143M 是一个 143M 参数的中英双语语言模型,在约 100B token 的中英文数据上训练完成。模型在华为昇腾生态上进行全流程训练,整体流程基于 **MindSpeed-LLM** 框架和 Atlas A2 服务器(910B)。同时配套训练了大小为 64,000 的中英双语词表。该模型在 150M 以下参数规模的多语言模型中具有较强竞争力,并在多个评测指标中排名靠前。
## 模型架构
| 参数 | 值 |
|------|-----|
| 架构 | Qwen3 |
| 层数 | 30 |
| 隐层维度 | 576 |
| 注意力头数 | 9 |
| KV 头数 (GQA) | 3 |
| 头维度 | 64 |
| FFN 中间维度 | 1,536 |
| 词表大小 | 64,000 |
| 最大序列长度 | 4,096 |
| 绑定嵌入 | 是 |
| 位置编码 | RoPE (θ=100,000) |
| 注意力偏置 | 无 |
| 精度 | BF16 |
| 总参数量 | ~143M |
## 训练数据
模型在约 100B token 的中英文混合数据上训练。主要数据来源为:
- [openbmb/Ultra-FineWeb](https://huggingface.co/datasets/openbmb/Ultra-FineWeb) (ultrafineweb-en + ultrafineweb-zh)
- [mlfoundations/dclm-baseline-1.0-parquet](https://huggingface.co/datasets/mlfoundations/dclm-baseline-1.0-parquet) (dclm)
- [HuggingFaceTB/finemath](https://huggingface.co/datasets/HuggingFaceTB/finemath) (finemath-4plus)
## 训练配置
| 参数 | 值 |
|------|------|
| 框架 | MindSpeed-LLM (v2.3.0) |
| 硬件 | 8 台 Atlas A2 服务器 (每台 8 卡 NPU,256 核) |
| NPU 型号 | 华为昇腾 910B |
| 总 NPU 数 | 64 (8 节点 × 8 卡) |
| 序列长度 | 4,096 |
## 优化器
| 参数 | 值 |
|------|------|
| 优化器 | AdamW |
| 峰值学习率 | 3e-4 |
| 最低学习率 | 3e-5 |
## 词表
| 属性 | 值 |
|------|------|
| 类型 | SentencePiece BPE |
| 词表大小 | 64,000 |
| 语言覆盖 | 英文 + 中文 |
## 测评
在 checkpoint (~98B tokens) 上基于 lighteval 框架(v0.9.2)测评。
| Benchmark | Score |
|------|------|
| ARC-Easy | 60.44 |
| ARC-Challenge | 27.13 |
| PIQA | 67.25 |
| HellaSwag | 37.91 |
| OpenBookQA | 31.8 |
| Winogrande | 52.17 |
| agi_eval | 23.78 |
## 核心特点
- **全昇腾原生**: 完全在华为昇腾 910B NPU 上训练,使用 MindSpeed-LLM 框架
- **中英双语**: 模型基于中英混合数据集训练
## 预期用途
本模型为研究型模型,适用于:
- 研究小模型在昇腾 NPU 上的训练动态
- 中英文语言建模研究
- 作为后续微调或退火实验的基础模型
## 局限性
- 模型规模较小,推理和生成能力有限
- 仅为原始预训练模型
## Citation
```bibtex
@misc{haidass-143m,
title={haidass-143M: A Bilingual Small Language Model Trained on Ascend 910B},
year={2026},
note={Based on Qwen3 architecture, trained from scratch on 100B tokens using MindSpeed-LLM on 64× Ascend 910B NPUs}
}
```
## License
Apache 2.0
|