Raptor X
Collection
Raptor X: Advanced UI Coder, Reasoning and General-Purpose Coder, and Math LLM • 5 items • Updated • 1
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Raptor-X3")
model = AutoModelForCausalLM.from_pretrained("prithivMLmods/Raptor-X3")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))Raptor X3 is based on the Qwen 2.5 14B modality architecture, designed to enhance the reasoning capabilities of 14B-parameter models. This model is optimized for advanced coding reasoning and UI coding. It excels in contextual understanding, logical deduction, and multi-step problem-solving. Raptor X3 has been fine-tuned using a long chain-of-thought reasoning model and specialized datasets to improve comprehension, structured responses, and conversational intelligence.
Key improvements include:
Prompt Style :
Make a dark-themed minimalist dashboard for an oil rig.
[HTML, CSS, and more if required].
Here is a code snippet with apply_chat_template to show you how to load the tokenizer and model and generate content:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "prithivMLmods/Raptor-X3"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "How do I optimize React performance?"
messages = [
{"role": "system", "content": "You are a helpful assistant capable of answering a wide range of questions."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
Base model
prithivMLmods/Megatron-Corpus-14B-Exp
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/Raptor-X3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)