update ch05

This commit is contained in:
KMnO4-zx
2025-02-26 20:31:51 +08:00
parent ca3e727e1c
commit 3512f55993
9 changed files with 699 additions and 405 deletions

View File

@@ -417,7 +417,7 @@ class Transformer(PreTrainedModel):
return idx[:, index:] # 只返回生成的token
if __name__ == '__main__':
tokenizer = AutoTokenizer.from_pretrained("/home/user/szx/code/k-llm/tokenizer_k")
tokenizer = AutoTokenizer.from_pretrained("tokenizer_k")
args = ModelConfig(
dim=1024,
n_layers=18,