lordcoder-v0-14-5B / README.md
Ayushk44's picture
Update README.md
7860538
|
raw
history blame
756 Bytes
---
license: bigcode-openrail-m
---
Usage:
```
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"
model = AutoModelForCausalLM.from_pretrained("nolanoAI/lordcoder-v0-14-9B", trust_remote_code=True).to(device)
tokenizer = AutoTokenizer.from_pretrained("nolanoAI/lordcoder-v0-14-9B", 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, # model has no pad token
)
```