ernie-4.5-lora-fwd-sedan-triage
30
—
by
saadywdfsdfd
Language Model
OTHER
21B params
New
30 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
47GB+ RAM
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Device Compatibility
Mobile
4-6GB RAM
Laptop
16GB RAM
Server
GPU
Minimum Recommended
20GB+ RAM
Code Examples
How to Usebash
pip install unsloth peft transformers trl bitsandbytes accelerateHow to Usepythonpytorch
import torch
from unsloth import FastLanguageModel, get_chat_template
from peft import PeftModel
BASE_MODEL = "unsloth/ERNIE-4.5-21B-A3B-PT"
ADAPTER_ID = "saadywdfsdfd/ernie-4.5-lora-fwd-sedan-triage"
# Load base
model, tokenizer = FastLanguageModel.from_pretrained(
BASE_MODEL,
max_seq_length = 2048,
dtype = torch.bfloat16,
load_in_4bit = True,
)
# Apply ChatML template (matches training)
tokenizer = get_chat_template(tokenizer, chat_template="chatml")
# Load adapter
model = PeftModel.from_pretrained(model, ADAPTER_ID)
# Inference mode
FastLanguageModel.for_inference(model)
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Car shakes only when AC is on at idle. 145k miles. Most likely cause? Give 2 to 3 sentences."},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=200,
temperature=0.7,
top_p=0.9,
do_sample=True,
)
print(tokenizer.decode(output[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.