binglinchengxia commited on
Commit
60cbb00
·
verified ·
1 Parent(s): b0b7604

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -48,7 +48,7 @@ model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_
48
  text = "#write a quick sort algorithm"
49
  inputs = tokenizer(text, return_tensors="pt").to(model.device)
50
  outputs = model.generate(**inputs, max_new_tokens=80)
51
- print(tokenizer.decode(outputs[0], skip_special_tokens=True)[len(text):]))
52
  ```
53
  **Code Insertion**
54
  ```python
@@ -69,7 +69,7 @@ text = """<|fim▁begin|>def find_longest_substring(s):
69
  return max_length<|fim▁end|>"""
70
  inputs = tokenizer(text, return_tensors="pt").to(model.device)
71
  outputs = model.generate(**inputs, max_new_tokens=80)
72
- print(tokenizer.decode(outputs[0], skip_special_tokens=True)[len(text):]))
73
  ```
74
 
75
  ## 3.License
 
48
  text = "#write a quick sort algorithm"
49
  inputs = tokenizer(text, return_tensors="pt").to(model.device)
50
  outputs = model.generate(**inputs, max_new_tokens=80)
51
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True)[len(text):])
52
  ```
53
  **Code Insertion**
54
  ```python
 
69
  return max_length<|fim▁end|>"""
70
  inputs = tokenizer(text, return_tensors="pt").to(model.device)
71
  outputs = model.generate(**inputs, max_new_tokens=80)
72
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True)[len(text):])
73
  ```
74
 
75
  ## 3.License