Model Details
- Base model:
Qwen/Qwen2.5-7B-Instruct
- Training method: supervised fine-tuning with LoRA
- LoRA rank: 16
- Checkpoint:
qwen2_5_7b_lora16_sigbg_irred_red_v1, step 2200
- Training code:
ho22joshua/hep-posttraining
- Dataset:
ho22joshua/hep-signature-backgrounds
Intended Use
The model is intended for research workflows that ask for concise HEP reasoning about final-state signatures, dominant backgrounds, irreducible backgrounds, and reducible backgrounds.
Quick Start
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
from peft import PeftModel
base_model_id = "Qwen/Qwen2.5-7B-Instruct"
adapter_id = "ho22joshua/hep-qwen2.5-7b-lora16-sigbg-irred-red-step2200"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
device_map="auto",
torch_dtype="auto",
)
model = PeftModel.from_pretrained(model, adapter_id)
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
messages = [
{"role": "user", "content": "For a search targeting H to AA to photons, describe the signal signature and likely Standard Model backgrounds."}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
print(pipe(prompt, max_new_tokens=300, do_sample=False)[0]["generated_text"])
OpenAI-Compatible Local Endpoint
For endpoint serving, either load the adapter with a serving runtime that supports LoRA, or merge the adapter into the base model first.
python -m vllm.entrypoints.openai.api_server \
--model Qwen/Qwen2.5-7B-Instruct \
--enable-lora \
--lora-modules hep=ho22joshua/hep-qwen2.5-7b-lora16-sigbg-irred-red-step2200 \
--host 0.0.0.0 \
--port 8000 \
--dtype bfloat16
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "hep",
"messages": [
{"role": "user", "content": "For H to AA to photons, what backgrounds should be considered?"}
],
"max_tokens": 300
}'
Limitations
This model is a research artifact. It can make factual or physics mistakes and should not be used as a substitute for expert review, validated simulation, internal collaboration guidance, or publication-quality analysis approval.
License
The model license follows the constraints of the base model and the generated training data. Please verify those terms before downstream redistribution or commercial use.