daVinci-Agency
27
license:mit
by
GAIR
Language Model
OTHER
New
27 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Code Examples
Quick Start (Transformers)pythontransformers
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"
model_path = "GAIR/daVinci-Agency" # Replace with actual path
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_path,
torch_dtype=torch.bfloat16,
low_cpu_mem_usage=True,
trust_remote_code=True
).to(device).eval()
# Example: Complex Long-Horizon Task
query = "Refactor the authentication module in this repository to support OAuth2, ensuring backward compatibility."
messages = [
{"role": "system", "content": "You are an intelligent software engineering agent capable of long-horizon planning and execution."},
{"role": "user", "content": query}
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_tensors="pt",
return_dict=True
).to(device)
gen_kwargs = {
"max_new_tokens": 4096,
"do_sample": True,
"top_p": 0.95,
"temperature": 1.0,
"top_k": 40
}
with torch.no_grad():
outputs = model.generate(**inputs, **gen_kwargs)
response = outputs[:, inputs['input_ids'].shape[1]:]
print(tokenizer.decode(response[0], skip_special_tokens=True))Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.