You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Barbet 1B Base — Native 1M

OpenFormosa/barbet-1b-base 是 Barbet 1B 系列的 decoder-only hybrid causal language model。本版更新為 Final-Global iter768:以一般 next-token pre-training objective 在物理長度 1,048,576 tokens 的 sequences 上 continued pre-training,並將 Hub 預設 context 設為原生 1M。

這不是 instruction-tuned assistant,也沒有使用 chat template、SFT、RLHF 或自訂 answer loss。

本次更新

  • 取代先前 Retry29 iteration 128 權重。
  • 從原本 [G,S,S,M] × 7 更新為 [G,G,G,M] × 7 + G
  • 預設 max_position_embeddings 從 256K 更新為 1,048,576
  • 完成 exact-1M 物理 pre-training、terminal checkpoint save 與 fresh full-state reload。
  • 依專案採用的 release criterion,7 個 exact-1M long tasks 中 5 個有效,因此指定為 stable 1M
  • Frozen 六桶 base-LM BPB retention 6/6 通過

模型架構

項目 設定
Stored parameters(不重複 tied LM head) 1,118,799,096
Hidden size 1,536
Logical layers 29
Global-attention layers 22
Mamba2 layers 7
Attention heads / KV heads 16 / 2
RoPE theta 10,000,000
Native context 1,048,576
Vocabulary size 114,944
Weight dtype BF16(少量 Mamba state parameters 為 FP32)

Global attention layers:[0,1,2,4,5,6,8,9,10,12,13,14,16,17,18,20,21,22,24,25,26,28]

Mamba layers:[3,7,11,15,19,23,27]

Stable 1M 的定義

本發布的 operational criterion 是:

  1. exact 1,048,576-token physical training path 成功;
  2. iter768 model、optimizer、RNG 與 checkpoint scheduler 可 fresh full-state reload;
  3. frozen exact-1M suite 中至少 5/7 tasks 的 paired-bootstrap 95% CI lower bound > 0;
  4. frozen 六桶 causal base-LM BPB retention 通過。
Exact-1M task Mean nats / target token 95% CI 結果
Exact NIAH +0.898943 [+0.477688, +1.334773] PASS
Multi-key +1.088922 [+0.613541, +1.625454] PASS
Opaque NIAH +1.133234 [+0.565343, +1.800033] PASS
Ordering +1.249291 [+0.801320, +1.749362] PASS
Three-hop chain +1.000748 [+0.502769, +1.571158] PASS
Aggregation −0.015120 [−0.043641, +0.013284] NOT PROVEN
Variable tracking −0.019111 [−0.063238, +0.017647] NOT PROVEN

全體 140 rows 的 mean 為 +0.762415,95% CI [+0.585254, +0.964181]

重要界線: stable 1M 是上述 5/7 criterion 下的 project release designation,不代表 aggregation 與 variable tracking 已在 1M 成功,也不是 7/7 long-context mastery。評估是 plain causal base-LM teacher-forced target-only NLL,不是 chat、multiple-choice 或 free-generation benchmark。

完整、machine-readable 的結果見 stable_1m_report.json

Base-model retention

以原始 Barbet base checkpoint 作 reference,在 frozen 6,955-row、3,000,079-token causal base-LM BPB suite 上:

  • 6/6 buckets PASS;
  • macro retention fraction:0.998897
  • 最大相對惡化:0.3415%(ja/ko);
  • zh/tw/zh 相對惡化:0.3200%
  • code、English、math、multilingual 沒有惡化。

這只證明 frozen 六桶 BPB retention,不代表所有原始能力、safety 或下游 benchmark 都已完整驗證。

Pre-training 與物理證據

  • Objective:所有自然 tokens 的 causal next-token cross-entropy。
  • Terminal exact-1M stage:480 updates、503,316,480 physical tokens。
  • Topology:8 GPUs,TP2 × CP4 × DP1,global batch size 1 sequence。
  • Terminal health:0 skipped iterations、0 NaN iterations。
  • Final checkpoint:iter768,成功保存並正常退出。
  • Fresh full-state reload:model、ordinary Adam state、RNG 與 scheduler 成功載入;0 training updates。
  • Final-stage data mix:50% general replay、37.5% dense arithmetic dependency data、12.5% dense variable dependency data。

訓練資料本身不隨模型發布;資料權利與再散布需獨立審查。

載入方式

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("OpenFormosa/PangolinTokenizer")
model = AutoModelForCausalLM.from_pretrained(
    "OpenFormosa/barbet-1b-base",
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

config.json 已是 native 1M architecture。短序列可直接使用同一 config;真正執行 1M sequence 需要足夠的 GPU memory、context parallelism 與相容的 optimized kernels,單張消費級 GPU 通常不可行。

CUDA 環境建議安裝相容版本的 mamba_ssm。缺少 mamba_ssm 時,custom model code 會使用較慢的 PyTorch fallback;不同 kernel 與精度可能造成小幅數值差異。

發布與 hashes

  • Checkpoint:Final-Global iter768
  • DCP tree SHA256:ccb215b718b4b21f372ecf9530924d7cae65abcdde5fcf6c57cd6955cece0df0
  • model.safetensors SHA256:4a0cada7becd8f87d706df65cee0fe5b486d5cfafc4fef1344cdbdcddc849304
  • config.json SHA256:968e293a32e225a993e9a0e503ed4f41f0d3c69e7d7b03c85078497935b48d91
  • Tied LM head 未重複儲存。
  • Optimizer、RNG state、raw DCP shards 與 training data 未上傳。
  • 詳細檔案 hashes:release_manifest.json

已知限制

  • Aggregation 與 variable tracking 在 frozen exact-1M suite 尚未證明有效。
  • Exact retrieval 與 teacher-forced target NLL 不等同完整自然文件理解或可靠 answer generation。
  • 模型未經 instruction tuning 或 deployment safety alignment,可能產生錯誤、偏見、重複或不安全內容。
  • 高風險用途需要獨立能力、安全與資料治理審查。
  • License metadata 沿用 other;使用前請確認適用條款。
Downloads last month
4
Safetensors
Model size
1B params
Tensor type
F32
·
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for OpenFormosa/barbet-1b-base

Finetunes
1 model