refactor(项目结构) 重构为 workspace 多成员项目

- 将项目拆分为三个 crate:minicpm-core(核心模型)、minicpm-convert(转换功能)、minicpm-inference(推理功能)
- 添加两个示例:minimal-inference(最小推理)和 convert(模型转换)
- 转换后自动拷贝 config.json 和 tokenizer.json 到 model 目录
- 更新 README 说明 workspace 结构和使用方式
This commit is contained in:
2026-07-01 14:33:28 +08:00
parent 7e0585421f
commit 69b37ced07
29 changed files with 654446 additions and 421 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
}
BIN
View File
Binary file not shown.
+653947
View File
File diff suppressed because it is too large Load Diff