A fine-tuned Qwen 2.5 7B model, fine tuned for more engaging conversation, encouraging the user to think about different aspects.
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.
Quantized GGUF versions are available in the
theprint/DevilsAdvocate-7B-GGUF repo.
This data set was created to limit sycofancy and encourage gentle pushback in language models.
1from unsloth import FastLanguageModel
2import torch
3
4# Load model and tokenizer
5model, tokenizer = FastLanguageModel.from_pretrained(
6 model_name="theprint/DevilsAdvocate-7B",
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/DevilsAdvocate-7B",
6 torch_dtype=torch.float16,
7 device_map="auto"
8)
9tokenizer = AutoTokenizer.from_pretrained("theprint/DevilsAdvocate-7B")
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/DevilsAdvocate-7B/resolve/main/gguf/DevilsAdvocate-7B-q4_k_m.gguf
3
4# Run with llama.cpp
5./llama.cpp/main -m DevilsAdvocate-7B-q4_k_m.gguf -p "Your prompt here" -n 256
May provide incorrect information.
1@misc{devilsadvocate_7b,
2 title={DevilsAdvocate-7B: Fine-tuned Qwen/Qwen2.5-7B-Instruct},
3 author={theprint},
4 year={2025},
5 publisher={Hugging Face},
6 url={https://huggingface.co/theprint/DevilsAdvocate-7B}
7}