Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ torchrun --nproc_per_node=4 --master_port=<your_random_port> train.py \
--lr_scheduler_type "cosine" \
--logging_steps 1 \
--fsdp "full_shard auto_wrap" \
--fsdp_transformer_layer_cls_to_wrap 'LLaMADecoderLayer' \
--fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer' \
--tf32 True
```

Expand Down
4 changes: 2 additions & 2 deletions chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def load_model(model_name, eight_bit=0, device_map="auto"):
gpu_count = torch.cuda.device_count()
print('gpu_count', gpu_count)

tokenizer = transformers.LLaMATokenizer.from_pretrained(model_name)
model = transformers.LLaMAForCausalLM.from_pretrained(
tokenizer = transformers.LlamaTokenizer.from_pretrained(model_name)
model = transformers.LlamaTokenizer.from_pretrained(
model_name,
#device_map=device_map,
#device_map="auto",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ numpy
rouge_score
fire
openai
git+https://github.com/zphang/transformers.git@68d640f7c368bcaaaecfc678f11908ebbd3d6176
transformers==4.28.1
torch
sentencepiece
tokenizers==0.12.1
Expand Down