torotoki commited on
Commit
bdb23c0
1 Parent(s): caa2d88

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -1
README.md CHANGED
@@ -19,12 +19,13 @@ This model is released under CC-BY-NC-4.0.
19
  ## Usage
20
  Install the required libraries as follows:
21
  ```sh
22
- >>> python -m pip install numpy safetensors sentencepiece torch transformers
23
 
24
  ```
25
 
26
  Execute the following python code:
27
  ```python
 
28
  from transformers import AutoTokenizer, AutoModelForCausalLM
29
  tokenizer = AutoTokenizer.from_pretrained(
30
  "pfnet/plamo-13b-instruct-nc",
@@ -36,7 +37,9 @@ model = AutoModelForCausalLM.from_pretrained(
36
  torch_dtype=torch.bfloat16,
37
  device_map="auto",
38
  )
 
39
 
 
40
  def completion(prompt: str, max_new_tokens: int = 128) -> str:
41
  inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
42
  generated_ids = model.generate(
 
19
  ## Usage
20
  Install the required libraries as follows:
21
  ```sh
22
+ >>> python -m pip install numpy safetensors sentencepiece torch transformers accelerate
23
 
24
  ```
25
 
26
  Execute the following python code:
27
  ```python
28
+ import torch
29
  from transformers import AutoTokenizer, AutoModelForCausalLM
30
  tokenizer = AutoTokenizer.from_pretrained(
31
  "pfnet/plamo-13b-instruct-nc",
 
37
  torch_dtype=torch.bfloat16,
38
  device_map="auto",
39
  )
40
+ ```
41
 
42
+ ```python
43
  def completion(prompt: str, max_new_tokens: int = 128) -> str:
44
  inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
45
  generated_ids = model.generate(