A fine-tuned 7B parameter model specialized for step-by-step instruction and conversation.
This model is a fine-tuned version of Qwen/Qwen2.5-7B-Instruct using the Unsloth framework with LoRA (Low-Rank Adaptation) for efficient training.
You can find quantized gguf versions of this model in the
/gguf-folder.
Synthesized data set created specifically for this, focused on practical tips and well being.
1from unsloth import FastLanguageModel
2import torch
3
4# Load model and tokenizer
5model, tokenizer = FastLanguageModel.from_pretrained(
6 model_name="theprint/Tom-Qwen-7B-Instruct",
7 max_seq_length=4096,
8 dtype=None,
9 load_in_4bit=True,
10)
11
12# Enable inference mode
13FastLanguageModel.for_inference(model)
14
15# Example usage
16inputs = tokenizer(["Your prompt here"], return_tensors="pt")
17outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)
18response = tokenizer.decode(outputs[0], skip_special_tokens=True)
19print(response)
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model = AutoModelForCausalLM.from_pretrained(
5 "theprint/Tom-Qwen-7B-Instruct",
6 torch_dtype=torch.float16,
7 device_map="auto"
8)
9tokenizer = AutoTokenizer.from_pretrained("theprint/Tom-Qwen-7B-Instruct")
10
11# Example usage
12messages = [
13 {"role": "system", "content": "You are a helpful assistant."},
14 {"role": "user", "content": "Your question here"}
15]
16
17inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
18outputs = model.generate(inputs, max_new_tokens=256, temperature=0.7, do_sample=True)
19response = tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True)
20print(response)
1# Download a quantized version (q4_k_m recommended for most use cases)
2wget https://huggingface.co/theprint/Tom-Qwen-7B-Instruct/resolve/main/gguf/Tom-Qwen-7B-Instruct-q4_k_m.gguf
3
4# Run with llama.cpp
5./llama.cpp/main -m Tom-Qwen-7B-Instruct-q4_k_m.gguf -p "Your prompt here" -n 256
May hallucinate or provide incorrect information. Not suitable for critical decision making.
1@misc{tom_qwen_7b_instruct,
2 title={Tom-Qwen-7B-Instruct: Fine-tuned Qwen/Qwen2.5-7B-Instruct},
3 author={theprint},
4 year={2025},
5 publisher={Hugging Face},
6 url={https://huggingface.co/theprint/Tom-Qwen-7B-Instruct}
7}