This is a LoRA (Low-Rank Adaptation) fine-tuned model based on Qwen that has been trained to provide direct numerical answers to math problems without showing reasoning steps.
Model Details
Base Model
: Qwen (fine-tuned checkpoint)
Fine-tuning Method
: LoRA (r=8, alpha=16)
Training Data
: GSM8K dataset (7,473 examples)
Target
: Direct numerical answers without
<think>
tags
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load your base model and tokenizer
base_model_path = "path/to/your/base/model"# Update with your base model
model = AutoModelForCausalLM.from_pretrained(base_model_path, torch_dtype="bfloat16")
tokenizer = AutoTokenizer.from_pretrained(base_model_path)
# Load LoRA weights
model = PeftModel.from_pretrained(model, "ziadrone/qwen-direct-answer-lora")
# Generate direct answers
question = "If John has 5 apples and gives away 2, how many does he have left?"
inputs = tokenizer(question, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50, do_sample=False)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(answer)
This model has been fine-tuned to provide direct numerical answers instead of showing step-by-step reasoning, making it suitable for applications where only the final answer is needed.
Files
adapter_config.json
: LoRA configuration
adapter_model.safetensors
: LoRA weights
README.md
: This model card
How to Load
Since this is a LoRA adapter, you need to:
Load your base Qwen model first
Apply this LoRA adapter on top of it using PEFT
Use the combined model for inference
The adapter will modify the model's behavior to output direct answers without reasoning steps.
Runs of ziadrone qwen-direct-answer-full1 on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About qwen-direct-answer-full1 huggingface.co Model
qwen-direct-answer-full1 huggingface.co is an AI model on huggingface.co that provides qwen-direct-answer-full1's model effect (), which can be used instantly with this ziadrone qwen-direct-answer-full1 model. huggingface.co supports a free trial of the qwen-direct-answer-full1 model, and also provides paid use of the qwen-direct-answer-full1. Support call qwen-direct-answer-full1 model through api, including Node.js, Python, http.
qwen-direct-answer-full1 huggingface.co is an online trial and call api platform, which integrates qwen-direct-answer-full1's modeling effects, including api services, and provides a free online trial of qwen-direct-answer-full1, you can try qwen-direct-answer-full1 online for free by clicking the link below.
ziadrone qwen-direct-answer-full1 online free url in huggingface.co:
qwen-direct-answer-full1 is an open source model from GitHub that offers a free installation service, and any user can find qwen-direct-answer-full1 on GitHub to install. At the same time, huggingface.co provides the effect of qwen-direct-answer-full1 install, users can directly use qwen-direct-answer-full1 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
qwen-direct-answer-full1 install url in huggingface.co: