Downloads · 30 days
3
5% of all-time downloads
zamanayaz/qwen3_0.5b_it_langsenti_merged_fp16
qwen3_0.5b_it_langsenti_merged_fp16 is a machine learning model from zamanayaz. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
def formatforsft(row): """ Create instruction-tuning format with system message for JSON generation """ text = row["text"] lang = row["lang"] sentiment = row["label"]
Downloads · 30 days
3
5% of all-time downloads
All-time downloads
62
Public
Parameters
636M
757 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors746 MB · 98%
How the weights are stored.
U8358M · 56%
From the Hugging Face model README
def format_for_sft(row): """ Create instruction-tuning format with system message for JSON generation """ # Extract language from text if it contains <lang> tag, otherwise use lang column text = row["text"] lang = row["lang"] sentiment = row["label"]
# Create instruction with system message format
messages = [
{"role": "system", "content": "You are a multilingual sentiment analyzer. Analyze the text and output valid JSON with language and sentiment tags. Only output the JSON, no additional text."},
{"role": "user", "content": f"Text: {text}"},
{"role": "assistant", "content": f'{{"language": "{lang}", "sentiment": "{sentiment}"}}'}
]
# Format for Qwen chat template
formatted = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=False
)
return {"text": formatted}