Text Generation
Transformers
Safetensors
Chinese
pinyin_code
babylm
chinese
pinyin
causal-lm
custom_code
Instructions to use CPSPX/babylm-zho-pinyin-code-33M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CPSPX/babylm-zho-pinyin-code-33M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CPSPX/babylm-zho-pinyin-code-33M", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("CPSPX/babylm-zho-pinyin-code-33M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CPSPX/babylm-zho-pinyin-code-33M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CPSPX/babylm-zho-pinyin-code-33M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CPSPX/babylm-zho-pinyin-code-33M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CPSPX/babylm-zho-pinyin-code-33M
- SGLang
How to use CPSPX/babylm-zho-pinyin-code-33M 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 "CPSPX/babylm-zho-pinyin-code-33M" \ --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": "CPSPX/babylm-zho-pinyin-code-33M", "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 "CPSPX/babylm-zho-pinyin-code-33M" \ --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": "CPSPX/babylm-zho-pinyin-code-33M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CPSPX/babylm-zho-pinyin-code-33M with Docker Model Runner:
docker model run hf.co/CPSPX/babylm-zho-pinyin-code-33M
Add evaluation config.yaml (locked NLU finetune hparams)
Browse files- config.yaml +32 -0
config.yaml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Chinese BabyLM 2026 — EVALUATION config for CPSPX/babylm-zho-pinyin-code-33M.
|
| 2 |
+
# This is the eval-pipeline config (NOT a training-params file). It fixes the
|
| 3 |
+
# NLU-track fine-tuning hyperparameters used at evaluation time.
|
| 4 |
+
models:
|
| 5 |
+
- path: CPSPX/babylm-zho-pinyin-code-33M
|
| 6 |
+
backend: causal
|
| 7 |
+
|
| 8 |
+
tasks:
|
| 9 |
+
zero_shot:
|
| 10 |
+
- zhoblimp
|
| 11 |
+
- hanzi_structure
|
| 12 |
+
- hanzi_pinyin
|
| 13 |
+
cogbench:
|
| 14 |
+
- word_fmri
|
| 15 |
+
- fmri
|
| 16 |
+
finetune:
|
| 17 |
+
- afqmc
|
| 18 |
+
- ocnli
|
| 19 |
+
- tnews
|
| 20 |
+
- cluewsc2020
|
| 21 |
+
|
| 22 |
+
eval_dir: evaluation_data
|
| 23 |
+
results_dir: results
|
| 24 |
+
save_item_with_unk: true
|
| 25 |
+
|
| 26 |
+
# NLU-track fine-tuning hyperparameters (locked before hidden tasks).
|
| 27 |
+
finetune_hparams:
|
| 28 |
+
lr: 3.0e-5
|
| 29 |
+
batch_size: 64
|
| 30 |
+
max_epochs: 5
|
| 31 |
+
sequence_length: 256
|
| 32 |
+
seed: 42
|