Downloads · 30 days
20
13% of all-time downloads
vmal/qwen2-7b-logical-reasoning
qwen2-7b-logical-reasoning is a machine learning model from vmal. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
An autoregressive language model fine-tuned on ConfinityChatMLv1 for enhanced chain-of-thought and logical reasoning in conversational settings. Built on Qwen2-7B using PEFT/LoRA.
Downloads · 30 days
20
13% of all-time downloads
All-time downloads
159
Public
Repo size
80.8 MB
Likes
0
Public
Click a slice to open those files.
.safetensors80.8 MB · 95%
From the Hugging Face model README
An autoregressive language model fine-tuned on ConfinityChatMLv1 for enhanced chain-of-thought and logical reasoning in conversational settings. Built on Qwen2-7B using PEFT/LoRA.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load tokenizer & base model
tokenizer = AutoTokenizer.from_pretrained(
"vmal/qwen2-7b-logical-reasoning",
trust_remote_code=True
)
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2-7B",
trust_remote_code=True,
device_map="auto"
)
# Load LoRA adapters
model = PeftModel.from_pretrained(base, "vmal/qwen2-7b-logical-reasoning")
# Inference example
prompt = (
"Solve step by step: If all bloops are razzies, and some razzies are lazzies, "
"are all bloops lazzies?"
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))