aixsatoshi commited on
Commit
0f9b99f
1 Parent(s): 929c30d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -0
README.md CHANGED
@@ -53,6 +53,7 @@ XML likeなinstructionテンプレートを採用しました
53
 
54
  ```
55
 
 
56
  ```
57
  from transformers import AutoModelForCausalLM, AutoTokenizer
58
 
@@ -62,6 +63,9 @@ model_name = "aixsatoshi/Honyaku-Multi-Translator-Swallow-ms7b"
62
  model = AutoModelForCausalLM.from_pretrained(model_name).to(device)
63
  tokenizer = AutoTokenizer.from_pretrained(model_name)
64
 
 
 
 
65
  # Define the English prompt
66
  english_prompt = "What is your favourite condiment?"
67
 
 
53
 
54
  ```
55
 
56
+ Example
57
  ```
58
  from transformers import AutoModelForCausalLM, AutoTokenizer
59
 
 
63
  model = AutoModelForCausalLM.from_pretrained(model_name).to(device)
64
  tokenizer = AutoTokenizer.from_pretrained(model_name)
65
 
66
+ # Move model to the appropriate device and set to bf16 precision
67
+ model.to(device).to(dtype=torch.bfloat16)
68
+
69
  # Define the English prompt
70
  english_prompt = "What is your favourite condiment?"
71