Downloads · 30 days
34
25% of all-time downloads
VijayShinde1996/vrs-sft-Qwen2_5-7B-it
vrs-sft-Qwen2_5-7B-it is a text generation model from VijayShinde1996. Use it when you need the model to write or continue text. It is set up for peft.
- Developed by: VRS Foundation - Model type: Causal Language Model (Fine-tuned) - Language(s): English - Finetuned from model: Qwen/Qwen2.5-7B-Instruct
Downloads · 30 days
34
25% of all-time downloads
All-time downloads
136
Public
Repo size
4.7 GB
Likes
1
Public
Click a slice to open those files.
.gguf4.7 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of Qwen2.5-7B-Instruct optimized for conversational chat using the HH-RLHF dataset. It has been fine-tuned using LoRA and exported to the GGUF q4_k_m format for efficient inference on CPU and consumer-grade GPUs using llama.cpp or llama-cpp-python.
The fine-tuning process utilized the Unsloth library to significantly accelerate training while minimizing memory consumption.
The model was fine-tuned on a 1,000-sample subset of the Anthropic/hh-rlhf dataset to align it with helpful and harmless conversational patterns. The training focused on the chosen conversations ("chosen" split) formatted with Human and Assistant roles.
q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_projThis model is packaged as a .gguf file (qwen2.5-7b-instruct.Q4_K_M.gguf), which can be loaded directly into UI frameworks like Streamlit using llama-cpp-python.
pip install llama-cpp-python streamlit
llama-cpp-python:from llama_cpp import Llama
# Load the model (moves layers to GPU if n_gpu_layers=-1 and CUDA is available)
llm = Llama(
model_path="qwen2.5-7b-instruct.Q4_K_M.gguf",
n_ctx=2048,
n_gpu_layers=-1
)
# Format the prompt using standard HH-RLHF format
prompt = "Explain the theory of relativity in simple terms."
formatted_prompt = f"Human: {prompt} \n\nAssistant:"
# Generate response
output = llm(
formatted_prompt,
max_tokens=256,
temperature=0.7,
stop=["Human:", "\n\n"],
echo=False
)
print(output["choices"][0]["text"].strip())
This model was paired with a minimal Streamlit app (app.py) featuring an interactive chat UI. You can run it via:
streamlit run app.py
For optimal performance and to maintain consistency with the fine-tuning process, use the following prompt format:
Human: {user_input}
Assistant: