Skip to content

Commit

Permalink
Fix doctest CI (huggingface#26324)
Browse files Browse the repository at this point in the history
fix doc CI

Co-authored-by: ydshieh <[email protected]>
  • Loading branch information
2 people authored and EduardoPach committed Nov 18, 2023
1 parent d5f8f60 commit 401ca17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/models/persimmon/modeling_persimmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,11 +790,11 @@ def forward(
```python
>>> from transformers import AutoTokenizer, PersimmonForCausalLM
>>> model = PersimmonForCausalLM.from_pretrained("ArthurZ/persimmon-8b-base").cuda()
>>> model = PersimmonForCausalLM.from_pretrained("ArthurZ/persimmon-8b-base")
>>> tokenizer = AutoTokenizer.from_pretrained("ArthurZ/persimmon-8b-base")
>>> prompt = "human: Hey, what should I eat for dinner?"
>>> inputs = tokenizer(prompt, return_tensors="pt").cuda()
>>> inputs = tokenizer(prompt, return_tensors="pt")
>>> # Generate
>>> generate_ids = model.generate(inputs.input_ids, max_length=30)
Expand Down
1 change: 1 addition & 0 deletions utils/not_doctested.txt
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ src/transformers/models/pegasus_x/modeling_pegasus_x.py
src/transformers/models/perceiver/configuration_perceiver.py
src/transformers/models/perceiver/convert_perceiver_haiku_to_pytorch.py
src/transformers/models/persimmon/convert_persimmon_weights_to_hf.py
src/transformers/models/persimmon/modeling_persimmon.py
src/transformers/models/pix2struct/configuration_pix2struct.py
src/transformers/models/pix2struct/convert_pix2struct_original_pytorch_to_hf.py
src/transformers/models/pix2struct/image_processing_pix2struct.py
Expand Down

0 comments on commit 401ca17

Please sign in to comment.