Mike0307 commited on
Commit
98d5593
1 Parent(s): f710983

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -18,7 +18,7 @@ The base-model [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microso
18
  the latest dev-version transformers and torch.<br>
19
  Also, it needs *trust_remote_code=True* as an argument of the from_pretrained() function.
20
  ```
21
- pip install git+https://github.com/huggingface/transformers
22
  pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
23
  ```
24
 
@@ -37,7 +37,7 @@ model_id = "Mike0307/Phi-3-mini-4k-instruct-chinese-lora"
37
  model = AutoModelForCausalLM.from_pretrained(
38
  model_id,
39
  device_map="mps", # Change mps if not MacOS
40
- torch_dtype=torch.float32,
41
  trust_remote_code=True,
42
  )
43
  tokenizer = AutoTokenizer.from_pretrained(model_id)
 
18
  the latest dev-version transformers and torch.<br>
19
  Also, it needs *trust_remote_code=True* as an argument of the from_pretrained() function.
20
  ```
21
+ pip install git+https://github.com/huggingface/transformers accelerate
22
  pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
23
  ```
24
 
 
37
  model = AutoModelForCausalLM.from_pretrained(
38
  model_id,
39
  device_map="mps", # Change mps if not MacOS
40
+ torch_dtype=torch.float32, # try float16 for M1 chip
41
  trust_remote_code=True,
42
  )
43
  tokenizer = AutoTokenizer.from_pretrained(model_id)