Text Generation
Transformers
Safetensors
English
qwen3_5_text
physics
high-energy-physics
hep
particle-physics
fine-tuned
qwen3.5
amd-mi300x
rocm
conversational
Eval Results (legacy)
Instructions to use rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x") model = AutoModelForMultimodalLM.from_pretrained("rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x
- SGLang
How to use rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x with Docker Model Runner:
docker model run hf.co/rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x
Update README.md
Browse files
README.md
CHANGED
|
@@ -18,6 +18,83 @@ datasets:
|
|
| 18 |
- pdg-particle-data
|
| 19 |
pipeline_tag: text-generation
|
| 20 |
library_name: transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
---
|
| 22 |
|
| 23 |
# hep-agent-qwen-qwen3-5-9b-mi300x
|
|
@@ -28,8 +105,6 @@ This model is a full fine-tune of [Qwen/Qwen3.5-9B](https://huggingface.co/Qwen/
|
|
| 28 |
corpus of High Energy Physics literature, experimental data, and synthetic Q&A.
|
| 29 |
Trained on a single AMD MI300X (192 GB HBM3, ROCm 7.0).
|
| 30 |
|
| 31 |
-
**Training date:** 2026-05-31
|
| 32 |
-
**Evaluation date:** 2026-05-31 (run `20260531_172915`)
|
| 33 |
|
| 34 |
## Model Overview
|
| 35 |
|
|
@@ -165,8 +240,19 @@ with torch.no_grad():
|
|
| 165 |
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
|
| 166 |
```
|
| 167 |
|
|
|
|
| 168 |
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
|
| 171 |
```python
|
| 172 |
from transformers import (
|
|
@@ -174,6 +260,7 @@ from transformers import (
|
|
| 174 |
AutoModelForCausalLM,
|
| 175 |
BitsAndBytesConfig,
|
| 176 |
)
|
|
|
|
| 177 |
|
| 178 |
model_name = "rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x"
|
| 179 |
|
|
@@ -195,12 +282,11 @@ tokenizer = AutoTokenizer.from_pretrained(
|
|
| 195 |
model = AutoModelForCausalLM.from_pretrained(
|
| 196 |
model_name,
|
| 197 |
device_map="auto",
|
| 198 |
-
dtype=torch.float16,
|
| 199 |
trust_remote_code=True,
|
| 200 |
quantization_config=bnb_config,
|
| 201 |
)
|
| 202 |
|
| 203 |
-
import torch
|
| 204 |
|
| 205 |
prompt = "Explain what a jet detector is in particle physics."
|
| 206 |
|
|
@@ -238,6 +324,7 @@ response = tokenizer.decode(
|
|
| 238 |
print(response)
|
| 239 |
```
|
| 240 |
|
|
|
|
| 241 |
### vLLM Server (Recommended for Production)
|
| 242 |
|
| 243 |
```bash
|
|
|
|
| 18 |
- pdg-particle-data
|
| 19 |
pipeline_tag: text-generation
|
| 20 |
library_name: transformers
|
| 21 |
+
model_size: 9B
|
| 22 |
+
widget:
|
| 23 |
+
- text: "What is the invariant mass of two photons with energies 62.5 GeV each, traveling back-to-back?"
|
| 24 |
+
example_title: Invariant mass calculation
|
| 25 |
+
- text: "Explain the CMS detector architecture and its main subsystems."
|
| 26 |
+
example_title: Detector explanation
|
| 27 |
+
- text: "A Z boson decays at rest into an electron-positron pair. What is the electron momentum?"
|
| 28 |
+
example_title: Decay kinematics
|
| 29 |
+
model-index:
|
| 30 |
+
- name: hep-agent-qwen-qwen3-5-9b-mi300x
|
| 31 |
+
results:
|
| 32 |
+
- task:
|
| 33 |
+
type: text-generation
|
| 34 |
+
dataset:
|
| 35 |
+
name: MMLU
|
| 36 |
+
type: cais/mmlu
|
| 37 |
+
config: all
|
| 38 |
+
metrics:
|
| 39 |
+
- name: MMLU (5-shot)
|
| 40 |
+
type: acc
|
| 41 |
+
value: 70.6
|
| 42 |
+
verified: false
|
| 43 |
+
- task:
|
| 44 |
+
type: text-generation
|
| 45 |
+
dataset:
|
| 46 |
+
name: ARC Challenge
|
| 47 |
+
type: allenai/ai2_arc
|
| 48 |
+
config: ARC-Challenge
|
| 49 |
+
metrics:
|
| 50 |
+
- name: ARC-Challenge (25-shot, norm)
|
| 51 |
+
type: acc_norm
|
| 52 |
+
value: 71.8
|
| 53 |
+
verified: false
|
| 54 |
+
- task:
|
| 55 |
+
type: text-generation
|
| 56 |
+
dataset:
|
| 57 |
+
name: MMLU Conceptual Physics
|
| 58 |
+
type: cais/mmlu
|
| 59 |
+
config: conceptual_physics
|
| 60 |
+
metrics:
|
| 61 |
+
- name: MMLU Conceptual Physics (5-shot)
|
| 62 |
+
type: acc
|
| 63 |
+
value: 77.9
|
| 64 |
+
verified: false
|
| 65 |
+
- task:
|
| 66 |
+
type: text-generation
|
| 67 |
+
dataset:
|
| 68 |
+
name: MMLU College Physics
|
| 69 |
+
type: cais/mmlu
|
| 70 |
+
config: college_physics
|
| 71 |
+
metrics:
|
| 72 |
+
- name: MMLU College Physics (5-shot)
|
| 73 |
+
type: acc
|
| 74 |
+
value: 58.8
|
| 75 |
+
verified: false
|
| 76 |
+
- task:
|
| 77 |
+
type: text-generation
|
| 78 |
+
dataset:
|
| 79 |
+
name: MMLU High School Physics
|
| 80 |
+
type: cais/mmlu
|
| 81 |
+
config: high_school_physics
|
| 82 |
+
metrics:
|
| 83 |
+
- name: MMLU High School Physics (5-shot)
|
| 84 |
+
type: acc
|
| 85 |
+
value: 62.9
|
| 86 |
+
verified: false
|
| 87 |
+
- task:
|
| 88 |
+
type: text-generation
|
| 89 |
+
dataset:
|
| 90 |
+
name: MMLU Astronomy
|
| 91 |
+
type: cais/mmlu
|
| 92 |
+
config: astronomy
|
| 93 |
+
metrics:
|
| 94 |
+
- name: MMLU Astronomy (5-shot)
|
| 95 |
+
type: acc
|
| 96 |
+
value: 80.9
|
| 97 |
+
verified: false
|
| 98 |
---
|
| 99 |
|
| 100 |
# hep-agent-qwen-qwen3-5-9b-mi300x
|
|
|
|
| 105 |
corpus of High Energy Physics literature, experimental data, and synthetic Q&A.
|
| 106 |
Trained on a single AMD MI300X (192 GB HBM3, ROCm 7.0).
|
| 107 |
|
|
|
|
|
|
|
| 108 |
|
| 109 |
## Model Overview
|
| 110 |
|
|
|
|
| 240 |
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
|
| 241 |
```
|
| 242 |
|
| 243 |
+
### Example 2
|
| 244 |
|
| 245 |
+
```bash
|
| 246 |
+
|
| 247 |
+
# Install latest stable Transformers
|
| 248 |
+
!pip install -U transformers==5.5.0
|
| 249 |
+
|
| 250 |
+
# Install remaining deps
|
| 251 |
+
!pip install -U accelerate bitsandbytes sentencepiece protobuf peft trl
|
| 252 |
+
|
| 253 |
+
# Optional
|
| 254 |
+
!pip install -U unsloth
|
| 255 |
+
```
|
| 256 |
|
| 257 |
```python
|
| 258 |
from transformers import (
|
|
|
|
| 260 |
AutoModelForCausalLM,
|
| 261 |
BitsAndBytesConfig,
|
| 262 |
)
|
| 263 |
+
import torch
|
| 264 |
|
| 265 |
model_name = "rajveer43/hep-agent-qwen-qwen3-5-9b-mi300x"
|
| 266 |
|
|
|
|
| 282 |
model = AutoModelForCausalLM.from_pretrained(
|
| 283 |
model_name,
|
| 284 |
device_map="auto",
|
| 285 |
+
dtype=torch.float16,
|
| 286 |
trust_remote_code=True,
|
| 287 |
quantization_config=bnb_config,
|
| 288 |
)
|
| 289 |
|
|
|
|
| 290 |
|
| 291 |
prompt = "Explain what a jet detector is in particle physics."
|
| 292 |
|
|
|
|
| 324 |
print(response)
|
| 325 |
```
|
| 326 |
|
| 327 |
+
|
| 328 |
### vLLM Server (Recommended for Production)
|
| 329 |
|
| 330 |
```bash
|