Text Generation
PEFT
Japanese
stardust-coder commited on
Commit
4ed041a
1 Parent(s): cf6dfa9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -6
README.md CHANGED
@@ -54,12 +54,12 @@ model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb_c
54
 
55
  # Load weights
56
  peft_name = "AIgroup-CVM-utokyohospital/Llama-2-70b-chat-4bit-japanese"
57
- model_peft = PeftModel.from_pretrained(
58
  model,
59
  peft_name,
60
  device_map="auto"
61
  )
62
- model_peft.eval()
63
 
64
  device = "cuda:0"
65
 
@@ -70,10 +70,6 @@ with torch.no_grad():
70
  temperature=0.0,
71
  repetition_penalty=1.00)
72
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
73
- outputs = model_peft.generate(**inputs,
74
- temperature=0.0,
75
- repetition_penalty=1.00)
76
- print(tokenizer.decode(outputs[0], skip_special_tokens=True))
77
  ```
78
 
79
  ## Sample Responses
 
54
 
55
  # Load weights
56
  peft_name = "AIgroup-CVM-utokyohospital/Llama-2-70b-chat-4bit-japanese"
57
+ model = PeftModel.from_pretrained(
58
  model,
59
  peft_name,
60
  device_map="auto"
61
  )
62
+ model.eval()
63
 
64
  device = "cuda:0"
65
 
 
70
  temperature=0.0,
71
  repetition_penalty=1.00)
72
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
 
 
 
 
73
  ```
74
 
75
  ## Sample Responses