Downloads · 30 days
115
21% of all-time downloads
mayank64ce/Newq-0.5B-Instruct
Newq-0.5B-Instruct is a text generation model from mayank64ce. 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.
Newq is a compact 0.5B-parameter instruction-tuned language model for chat and general text generation. It is small enough to run comfortably on CPU or a modest GPU, and supports long contexts.
Downloads · 30 days
115
21% of all-time downloads
All-time downloads
537
Public
Parameters
494M
988 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors988 MB · 99%
From the Hugging Face model README
Newq is a compact 0.5B-parameter instruction-tuned language model for chat and general text generation. It is small enough to run comfortably on CPU or a modest GPU, and supports long contexts.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "mayank64ce/Newq-0.5B-Instruct"
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)
messages = [{"role": "user", "content": "Give me a short introduction to large language models."}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512)
out = out[0][len(inputs.input_ids[0]):]
print(tokenizer.decode(out, skip_special_tokens=True))
Released under the Apache License 2.0.
This model is a derivative of Qwen/Qwen2.5-0.5B-Instruct by the Qwen team, Alibaba Cloud, used under Apache-2.0. The original license text is included in this repository.