Downloads · 30 days
5
18% of all-time downloads
TeamPV/0.5B-qwen-x16_v3_cp6000
0.5B-qwen-x16_v3_cp6000 is a machine learning model from TeamPV. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Downloads · 30 days
5
18% of all-time downloads
All-time downloads
28
Public
Parameters
5.5B
22.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt11.2 GB · 50%
From the Hugging Face model README
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "TeamPV/0.5B-qwen-x16_v3_cp6000"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "LGPL"
messages = [
{"role": "system", "content": "Act as the Model Openness Framework (MOF) expert, specializing in abbreviation expansion. Expand the following abbreviation into its most accurate full form within the MOF context. Provide only the full form, no explanations."},
{"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]