loubnabnl HF staff commited on
Commit
d387478
1 Parent(s): d3d5f4d

update namespace

Browse files
Files changed (1) hide show
  1. architectures/codeparrot.md +6 -6
architectures/codeparrot.md CHANGED
@@ -1,11 +1,11 @@
1
- [CodeParrot](https://huggingface.co/lvwerra/codeparrot) uses GPT-2 architecture with BPE tokenizer trained on Python code from the training split of the data, and a context length of 1024. This model was released as an educational tool for training large language models from scratch on code, with detailed tutorials and descriptions of the training process. It makes use of 🤗 [`accelerate`](https://huggingface.co/docs/accelerate/index) for distributed training and mixed precision. See this [blog](https://huggingface.co/blog/codeparrot) and [repo](https://github.com/huggingface/transformers/tree/main/examples/research_projects/codeparrot) for more details.
2
 
3
  <div align="center">
4
 
5
  |Model | # parameters |
6
  | - | - |
7
- | [codeparrot-small](https://huggingface.co/lvwerra/codeparrot-small) | 110M |
8
- | [codeparrot](https://huggingface.co/lvwerra/codeparrot) | 1.5B |
9
 
10
  </div>
11
 
@@ -15,8 +15,8 @@ You can load the model and tokenizer directly from 🤗 [`transformers`](https:/
15
  ```python
16
  from transformers import AutoTokenizer, AutoModelWithLMHead
17
 
18
- tokenizer = AutoTokenizer.from_pretrained("lvwerra/codeparrot")
19
- model = AutoModelWithLMHead.from_pretrained("lvwerra/codeparrot")
20
 
21
  inputs = tokenizer("def hello_world():", return_tensors="pt")
22
  outputs = model(**inputs)
@@ -28,6 +28,6 @@ You can also use `pipeline` to generate code:
28
  ```python
29
  from transformers import pipeline
30
 
31
- pipe = pipeline("text-generation", model="lvwerra/codeparrot")
32
  outputs = pipe("def hello_world():")
33
  ```
 
1
+ [CodeParrot](https://huggingface.co/codeparrot/codeparrot) uses GPT-2 architecture with BPE tokenizer trained on Python code from the training split of the data, and a context length of 1024. This model was released as an educational tool for training large language models from scratch on code, with detailed tutorials and descriptions of the training process. It makes use of 🤗 [`accelerate`](https://huggingface.co/docs/accelerate/index) for distributed training and mixed precision. See this [blog](https://huggingface.co/blog/codeparrot) and [repo](https://github.com/huggingface/transformers/tree/main/examples/research_projects/codeparrot) for more details.
2
 
3
  <div align="center">
4
 
5
  |Model | # parameters |
6
  | - | - |
7
+ | [codeparrot-small](https://huggingface.co/codeparrot/codeparrot-small) | 110M |
8
+ | [codeparrot](https://huggingface.co/codeparrot/codeparrot) | 1.5B |
9
 
10
  </div>
11
 
 
15
  ```python
16
  from transformers import AutoTokenizer, AutoModelWithLMHead
17
 
18
+ tokenizer = AutoTokenizer.from_pretrained("codeparrot/codeparrot")
19
+ model = AutoModelWithLMHead.from_pretrained("codeparrot/codeparrot")
20
 
21
  inputs = tokenizer("def hello_world():", return_tensors="pt")
22
  outputs = model(**inputs)
 
28
  ```python
29
  from transformers import pipeline
30
 
31
+ pipe = pipeline("text-generation", model="codeparrot/codeparrot")
32
  outputs = pipe("def hello_world():")
33
  ```