LoRDCoder v0 12.3B
Usage:
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"
model = AutoModelForCausalLM.from_pretrained("nolanoAI/lordcoder-v0-12-3B", trust_remote_code=True).to(device)
tokenizer = AutoTokenizer.from_pretrained("nolanoAI/lordcoder-v0-12-3B", 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,
)
- Downloads last month
- 9
Inference API (serverless) does not yet support model repos that contain custom code.