Test / load_ck.py
v-suxuerui
bin
659fe2d
raw
history blame
272 Bytes
from transformers import AutoTokenizer, LlamaForCausalLM, LlamaConfig, TrainingArguments ,DataCollatorForLanguageModeling
import torch
tokenizer = AutoTokenizer.from_pretrained("./")
model = LlamaForCausalLM.from_pretrained("./")
torch.save(model, "pytorch_model.bin")