Files
mistral-7b-detell/README.md
ModelHub XC b9eaedd35c 初始化项目,由ModelHub XC社区提供模型
Model: ArHFcloud/mistral-7b-detell
Source: Original Platform
2026-07-24 23:38:32 +08:00

1.0 KiB

base_model, library_name, pipeline_tag, tags
base_model library_name pipeline_tag tags
mistralai/Mistral-7B-Instruct-v0.2 transformers text-generation
mcquilibrium
multiple-choice
detell
qlora

mistral-7b-detell

MCQuilibrium de-tell model. A QLoRA fine-tune of Mistral-7B-Instruct-v0.2 that rewrites the answer choices of a multiple-choice question to remove tells, the surface artifacts that leak the correct answer. The LoRA adapter has been merged into the base weights, so this repo loads directly.

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained("ArHFcloud/mistral-7b-detell")
model = AutoModelForCausalLM.from_pretrained("ArHFcloud/mistral-7b-detell", device_map="auto")

messages = [{"role": "user", "content": "...question and choices..."}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=512)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))