feat(inference): 添加模型加载和分词器功能

feat(model): 实现 Llama 模型及其解码器层
feat(norm): 添加 RMSNorm 归一化层
feat(rope): 实现 RoPE 位置编码
This commit is contained in:
2026-07-01 10:56:43 +08:00
commit 7e0585421f
33 changed files with 14711 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
{
"_name_or_path": "openbmb/MiniCPM5-1B",
"architectures": [
"LlamaForCausalLM"
],
"bos_token_id": 0,
"eos_token_id": [
1,
130073
],
"pad_token_id": 1,
"hidden_act": "silu",
"hidden_size": 1536,
"initializer_range": 0.02,
"intermediate_size": 4608,
"max_position_embeddings": 131072,
"model_type": "llama",
"num_attention_heads": 16,
"num_hidden_layers": 24,
"num_key_value_heads": 2,
"head_dim": 128,
"rms_norm_eps": 1e-06,
"rope_theta": 5000000,
"rope_scaling": null,
"tie_word_embeddings": false,
"torch_dtype": "bfloat16",
"transformers_version": "5.6.2",
"use_cache": true,
"vocab_size": 130560
}