Text Generation
Transformers
PyTorch
code
gpt2
custom_code
Eval Results
text-generation-inference
Inference Endpoints
lvwerra HF staff commited on
Commit
052c6ae
1 Parent(s): fc6b64b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -6
README.md CHANGED
@@ -206,7 +206,7 @@ The SantaCoder models are a series of 1B parameter models trained on Python, Jav
206
  - **Languages:** Python, Java, and JavaScript
207
 
208
  |Model|Architecture|Objective|Filtering|
209
- |:-|:-|:-|:-|:-|
210
  |`mha`|MHA|AR + FIM| Base |
211
  |`no-fim`| MQA | AR| Base |
212
  |`fim`| MQA | AR + FIM | Base |
@@ -248,7 +248,7 @@ print(tokenizer.decode(outputs[0]))
248
  Fill-in-the-mid uses special tokens to identify the prefix/middle/suffic part of the input and output:
249
 
250
  ```python
251
- input_text = "<fim-prefix>def print_hello_world():\n <fim-suffix>\n print("Hello world!")<fim-middle>
252
  inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
253
  outputs = model.generate(inputs)
254
  print(tokenizer.decode(outputs[0]))
@@ -258,10 +258,11 @@ print(tokenizer.decode(outputs[0]))
258
  We upload the checkpoint of each experiment to a seperate branch as well as the intermediate checkpoints as commits on the branches. You can load them with the `revision` flag:
259
 
260
  ```python
261
- checkpoint = "bigcode/santacoder"
262
- revision = "no-fim" # name of branch or commit hash
263
-
264
- model = AutoModelForCausalLM.from_pretrained(checkpoint, revision=revision, trust_remote_code=True).to(device)
 
265
  ```
266
 
267
  ### Attribution
 
206
  - **Languages:** Python, Java, and JavaScript
207
 
208
  |Model|Architecture|Objective|Filtering|
209
+ |:-|:-|:-|:-|
210
  |`mha`|MHA|AR + FIM| Base |
211
  |`no-fim`| MQA | AR| Base |
212
  |`fim`| MQA | AR + FIM | Base |
 
248
  Fill-in-the-mid uses special tokens to identify the prefix/middle/suffic part of the input and output:
249
 
250
  ```python
251
+ input_text = "<fim-prefix>def print_hello_world():\n <fim-suffix>\n print('Hello world!')<fim-middle>"
252
  inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
253
  outputs = model.generate(inputs)
254
  print(tokenizer.decode(outputs[0]))
 
258
  We upload the checkpoint of each experiment to a seperate branch as well as the intermediate checkpoints as commits on the branches. You can load them with the `revision` flag:
259
 
260
  ```python
261
+ model = AutoModelForCausalLM.from_pretrained(
262
+ "bigcode/santacoder",
263
+ revision="no-fim", # name of branch or commit hash
264
+ trust_remote_code=True
265
+ )
266
  ```
267
 
268
  ### Attribution