Downloads · 30 days
11
3% of all-time downloads
iamanishx/axeai_m_0.2
axeai_m_0.2 is a text generation model from iamanishx. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
axeaim0.2 is a lightweight, conversational language model fine-tuned for high-quality Hinglish (Hindi in Roman/Latin script) interactions and coding assistance. It is built on top of iamanishx/axeaim0.1 (Qwen2.5-0.5B…
Downloads · 30 days
11
3% of all-time downloads
All-time downloads
384
Public
Parameters
494M
1000 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors988 MB · 99%
From the Hugging Face model README
axeai_m_0.2 is a lightweight, conversational language model fine-tuned for high-quality Hinglish (Hindi in Roman/Latin script) interactions and coding assistance. It is built on top of iamanishx/axeai_m_0.1 (Qwen2.5-0.5B architecture) and fully merged into standalone weights.
iamanishx/axeai_m_0.1safetensors)iamanishx/hinglish-dev-dataset (approx. 3,000 conversational and instruction pairs).Trained following modern SFT best practices:
q_proj, v_proj)For small language models (~0.5B), greedy decoding or low temperature sampling prevents repetition loops and produces crisp, accurate outputs:
do_sample=False) or Low Temperature (temperature=0.3, top_p=0.85)1.1<|im_end|> (151645) and <|endoftext|> (151643)import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "iamanishx/axeai_m_0.2"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
if tokenizer.pad_token is None:
tokenizer.pad_token = "<|endoftext|>"
dtype = torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float16
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=dtype,
device_map="auto",
trust_remote_code=True
)
system_prompt = "Tum ek helpful AI assistant ho. Tum Hinglish mein jawab dete ho, yaani Hindi ko English letters mein likhte ho. Agar user English mein puchhe toh bhi Hinglish mein jawab do."
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": "React kya hota hai aur iska use kab karna chahiye?"}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt"
).to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=256,
do_sample=False, # Greedy decoding for consistent, high-quality responses
repetition_penalty=1.1,
eos_token_id=[151643, 151645]
)
prompt_len = inputs["input_ids"].shape[1]
response = tokenizer.decode(outputs[0][prompt_len:], skip_special_tokens=True)
print(response)