添加模型文件分片 (Epoch 7, 3 parts + merge script)

This commit is contained in:
shuiyu1123 committed 2026-06-16 12:10:24 +00:00
1 parent 91db488ad4
commit 9cef1d9ba1
5 files changed
+31

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:861ca374c50f29a2d71758756554613b086e949b9a1bdfdb565677695765b2f4
size 52428800
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab7bf97d2fcecf68e75d2158e1cabc10dd6257398275dbf12ebbcdbbe84fbc1e
size 52428800
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4177a8ea2e36fef32470d7e9471571f769557fd94f479c254563bae106d243a8
size 52428800
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4eec556ead5ecf7902064a991fba42983e77cf0f8f004edd90a0ef144e834ee7
size 3480603
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
# 合并分片模型文件
# 用法: bash merge_model.sh
PARTS="llm_model_epoch7_part_aa llm_model_epoch7_part_ab llm_model_epoch7_part_ac llm_model_epoch7_part_ad"
OUTPUT="llm_model_v2_resume_epoch_7.pth"
echo "合并模型分片 → $OUTPUT ..."
cat $PARTS > $OUTPUT
echo "✅ 合并完成: $(ls -lh $OUTPUT | awk '{print $5}')"
echo ""
echo "使用方法:"
echo " python3 -c \"import json, torch;"
echo " from llm_chat_improved import LLMModel, LLMChat, tokenizer_instance;"
echo ' vocab = json.load(open("vocab_v2.json"));'
echo ' ckpt = torch.load("llm_model_v2_resume_epoch_7.pth", map_location="cpu");'
echo ' chat = LLMChat(LLMModel(...), vocab, device="cpu");'
echo ' print(chat.generate_response("小狸你好呀"));'
echo ' "'