初始化项目,由ModelHub XC社区提供模型
Model: Shamima/babylm-2026-multilingual-uniform-100M Source: Original Platform
This commit is contained in:
35
.gitattributes
vendored
Normal file
35
.gitattributes
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
87
README.md
Normal file
87
README.md
Normal file
@@ -0,0 +1,87 @@
|
||||
---
|
||||
license: mit
|
||||
language:
|
||||
- en
|
||||
- nl
|
||||
- zh
|
||||
library_name: transformers
|
||||
pipeline_tag: text-generation
|
||||
tags:
|
||||
- babylm
|
||||
- babylm-2026
|
||||
- multilingual
|
||||
- llama
|
||||
- pretrained-from-scratch
|
||||
---
|
||||
|
||||
# BabyLM 2026 — MultiLingual track baseline (byte-premium-uniform)
|
||||
|
||||
A 110M-param Llama-style decoder pre-trained from scratch on the BabyBabelLM
|
||||
trilingual corpus (English, Dutch, Chinese), under the BabyLM 2026
|
||||
MultiLingual track rules: **100M reference tokens, byte-premium adjusted**,
|
||||
≤10 epochs.
|
||||
|
||||
This is the *baseline* zero-point of our ablation grid. Subsequent runs vary
|
||||
the mixture allocation (loss-weighted, simultaneous-bilingual, typological-bridge
|
||||
curriculum, register-controlled) on top of an identical scaffold. The matching
|
||||
ablation paper is in preparation.
|
||||
|
||||
## Architecture
|
||||
|
||||
- Llama (HF `LlamaForCausalLM`) — RoPE, RMSNorm, SwiGLU, no biases, tied embeddings
|
||||
- 12 layers · 768 hidden · 12 heads · 2048 FFN
|
||||
- 1024 sequence length
|
||||
- 110,119,680 parameters
|
||||
|
||||
## Tokenizer
|
||||
|
||||
Joint byte-level BPE, 32,768 vocab, trained on a balanced 50M-char sample from
|
||||
each of EN/NL/ZH. The same tokenizer is shared across all three languages (see
|
||||
the data card for why a joint tokenizer is required: ZH is 6.8% Latin script).
|
||||
|
||||
## Training
|
||||
|
||||
- **Data:** `BabyLM-community/babylm-eng` + `babylm-nld` + `babylm-zho`
|
||||
(BabyBabelLM 2026 100M tier). Full corpora loaded in memory and shuffled
|
||||
(the Hub layout is category-clustered; streaming with reasonable buffers
|
||||
produces a biased sample).
|
||||
- **Mixture:** byte-premium-uniform — equal share of *reference tokens* per
|
||||
language (1/3 each), achieved by deficit-driven selection, not uniform doc
|
||||
sampling (mean doc sizes differ across languages).
|
||||
- **Optimizer:** AdamW (β₁=0.9, β₂=0.95, wd=0.1), lr 6e-4, cosine to 10%, 100-step warmup
|
||||
- **Compute:** 4× NVIDIA A10G (23 GB), bf16, DDP, micro-batch 16 × grad-accum 2 (eff. batch 128 sequences = 131k tokens/step)
|
||||
- **Tokens consumed at this checkpoint:** 100,000,000 byte-premium-adjusted reference tokens
|
||||
- **Per-language epochs at this checkpoint:** ≈1.0 each (within the BabyLM ≤10-epoch cap)
|
||||
|
||||
## Revisions
|
||||
|
||||
The `chck_{N}M` revisions match the BabyLM eval pipeline's fast-eval naming:
|
||||
|
||||
```
|
||||
chck_1M, chck_2M, ..., chck_9M, chck_10M, chck_20M, ..., chck_90M, chck_100M
|
||||
```
|
||||
|
||||
Use `revision=chck_NM` to load any milestone. The default (`main`) is `chck_100M`.
|
||||
|
||||
## How to evaluate
|
||||
|
||||
```bash
|
||||
git clone https://github.com/babylm-org/babylm-eval
|
||||
cd babylm-eval/multilingual
|
||||
bash scripts/zeroshot_model.sh --model_name Shamima/babylm-2026-multilingual-uniform-100M
|
||||
bash scripts/zeroshot_model_fast_all.sh --model_name Shamima/babylm-2026-multilingual-uniform-100M
|
||||
```
|
||||
|
||||
## Citation
|
||||
|
||||
```
|
||||
@misc{babylm-2026-uniform,
|
||||
title = {BabyLM 2026 MultiLingual baseline (byte-premium-uniform)},
|
||||
author = {Hossain, Shamima},
|
||||
year = {2026},
|
||||
url = {https://huggingface.co/Shamima/babylm-2026-multilingual-uniform-100M}
|
||||
}
|
||||
```
|
||||
|
||||
Companion repo with audit, scaffold, and ablation configs:
|
||||
https://github.com/silvererudite/bb-lm-challenge-sub
|
||||
30
config.json
Normal file
30
config.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"architectures": [
|
||||
"LlamaForCausalLM"
|
||||
],
|
||||
"attention_bias": false,
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 1,
|
||||
"eos_token_id": 2,
|
||||
"head_dim": 64,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 768,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 2048,
|
||||
"max_position_embeddings": 1024,
|
||||
"mlp_bias": false,
|
||||
"model_type": "llama",
|
||||
"num_attention_heads": 12,
|
||||
"num_hidden_layers": 12,
|
||||
"num_key_value_heads": 12,
|
||||
"pad_token_id": 0,
|
||||
"pretraining_tp": 1,
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_scaling": null,
|
||||
"rope_theta": 10000.0,
|
||||
"tie_word_embeddings": true,
|
||||
"torch_dtype": "float32",
|
||||
"transformers_version": "4.49.0",
|
||||
"use_cache": false,
|
||||
"vocab_size": 32768
|
||||
}
|
||||
8
generation_config.json
Normal file
8
generation_config.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"_from_model_config": true,
|
||||
"bos_token_id": 1,
|
||||
"eos_token_id": 2,
|
||||
"pad_token_id": 0,
|
||||
"transformers_version": "4.49.0",
|
||||
"use_cache": false
|
||||
}
|
||||
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:10ace8db3a096e526fdec126fa64a87cdd9cbe0903c06c5bae09573586498151
|
||||
size 440490952
|
||||
6
special_tokens_map.json
Normal file
6
special_tokens_map.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"bos_token": "<bos>",
|
||||
"eos_token": "<eos>",
|
||||
"pad_token": "<pad>",
|
||||
"unk_token": "<unk>"
|
||||
}
|
||||
162871
tokenizer.json
Normal file
162871
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
44
tokenizer_config.json
Normal file
44
tokenizer_config.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"added_tokens_decoder": {
|
||||
"0": {
|
||||
"content": "<pad>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"1": {
|
||||
"content": "<bos>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"2": {
|
||||
"content": "<eos>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"3": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
}
|
||||
},
|
||||
"bos_token": "<bos>",
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "<eos>",
|
||||
"extra_special_tokens": {},
|
||||
"model_max_length": 1000000000000000019884624838656,
|
||||
"pad_token": "<pad>",
|
||||
"tokenizer_class": "PreTrainedTokenizer",
|
||||
"unk_token": "<unk>"
|
||||
}
|
||||
Reference in New Issue
Block a user