Views
No views yet
transformers:1from transformers import AutoTokenizer, AutoModelWithLMHead
2
3tokenizer = AutoTokenizer.from_pretrained("codeparrot/codeparrot-small-multi")
4model = AutoModelWithLMHead.from_pretrained("codeparrot/codeparrot-small-multi")
5
6inputs = tokenizer("def hello_world():", return_tensors="pt")
7outputs = model(**inputs)pipeline:1from transformers import pipeline
2
3pipe = pipeline("text-generation", model="codeparrot/codeparrot-small-multi")
4outputs = pipe("def hello_world():")| Config | Value |
|---|---|
| Batch size | 192 |
| Context size | 1024 |
| Training steps | 300'000 |
| Gradient accumulation | 2 |
| Gradient checkpointing | False |
| Learning rate | 5e-4 |
| Weight decay | 0.1 |
| Warmup steps | 2000 |
| Schedule | Cosine |
| Metric | Value |
|---|---|
| pass@1 | --% |
| pass@10 | --% |
| pass@100 | --% |