File size: 753 Bytes
3f4b254 7860538 74120a4 7860538 74120a4 7860538 74120a4 7860538 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
---
license: bigcode-openrail-m
---
## LoRDCoder v0 14.5B
Usage:
```
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"
model = AutoModelForCausalLM.from_pretrained("nolanoAI/lordcoder-v0-14-5B", trust_remote_code=True).to(device)
tokenizer = AutoTokenizer.from_pretrained("nolanoAI/lordcoder-v0-14-5B", trust_remote_code=True)
inputs = {k: v.to(device) for k,v in tokenizer('# PyTorch CNN on MNIST\nimport torch\n', return_tensors='pt').items()}
generated_ids = model.generate(
**inputs,
use_cache=True,
max_new_tokens=500,
temperature=0.1,
top_p=0.95,
do_sample=True,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.eos_token_id,
)
```
|