losyer8 commited on
Commit
bfa085b
1 Parent(s): b142ab4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -49,6 +49,7 @@ Checkpoints format: Hugging Face Transformers (Megatron-DeepSpeed format models
49
  - torch>=2.0.0
50
  - transformers>=4.34.0
51
  - tokenizers>=0.14.0
 
52
  - peft==0.5.0
53
 
54
  ## Usage
@@ -60,7 +61,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
60
  peft_model_name = "llm-jp/llm-jp-13b-instruct-lora-jaster-dolly-oasst-v1.0"
61
  tokenizer = AutoTokenizer.from_pretrained(peft_model_name)
62
  config = PeftConfig.from_pretrained(peft_model_name)
63
- model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, torch_dtype=torch.float16)
64
  model = PeftModel.from_pretrained(model, peft_model_name)
65
  text = "自然言語処理とは何か"
66
  text = text + "### 回答:"
 
49
  - torch>=2.0.0
50
  - transformers>=4.34.0
51
  - tokenizers>=0.14.0
52
+ - accelerate==0.23.0
53
  - peft==0.5.0
54
 
55
  ## Usage
 
61
  peft_model_name = "llm-jp/llm-jp-13b-instruct-lora-jaster-dolly-oasst-v1.0"
62
  tokenizer = AutoTokenizer.from_pretrained(peft_model_name)
63
  config = PeftConfig.from_pretrained(peft_model_name)
64
+ model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, device_map="auto", torch_dtype=torch.float16)
65
  model = PeftModel.from_pretrained(model, peft_model_name)
66
  text = "自然言語処理とは何か"
67
  text = text + "### 回答:"