File size: 5,022 Bytes
17e0773 46ef547 8bb63f4 17e0773 46ef547 8bb63f4 17e0773 8bb63f4 17e0773 46ef547 17e0773 8bb63f4 17e0773 8bb63f4 17e0773 8bb63f4 17e0773 8bb63f4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
---
language:
- en
base_model: Qwen/Qwen3-8B
library_name: transformers
pipeline_tag: text-generation
tags:
- axolotl
- reasoning
- math
- commonsense
license: apache-2.0
datasets:
- NousResearch/Hermes-3-Dataset
model-index:
- name: Qwen3-Hermes8B-v1
results:
- task:
type: text-generation
name: Text Generation
dataset:
name: HellaSwag
type: hellaswag
metrics:
- type: accuracy
value: 0.823
name: Accuracy
- task:
type: text-generation
name: Mathematical Reasoning
dataset:
name: GSM8K
type: gsm8k
metrics:
- type: accuracy
value: 0.871
name: Accuracy
- task:
type: text-generation
name: Theory of Mind
dataset:
name: TheoryPlay
type: theoryplay
metrics:
- type: accuracy
value: 0.35
name: Accuracy
---
# Qwen3-Hermes8B-v1
This is a merged LoRA model based on Qwen/Qwen3-8B, SFT on Hermes3 Dataset. The model demonstrates strong performance across reasoning, mathematical problem-solving, and commonsense understanding tasks.
## Model Details
- **Base Model**: Qwen/Qwen3-8B
- **Language**: English (en)
- **Library**: transformers
- **Training Method**: LoRA fine-tuning with Axolotl
- **Infrastructure**: 8xB200 Cluster from PrimeIntellect
- **Training Framework**: DeepSpeed Zero2
## Performance
| Benchmark | Score | Description |
|-----------|-------|-------------|
| **HellaSwag** | 82.3% | Commonsense reasoning and natural language inference |
| **GSM8K** | 87.1% | Grade school math word problems |
| **TheoryPlay** | 35% | Theory of mind and social reasoning tasks |
## Usage
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_name = "justinj92/Qwen3-Hermes8B-v1"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
device_map="auto"
)
# Example usage for reasoning tasks
text = "Sarah believes that her keys are in her purse, but they are actually on the kitchen table. Where will Sarah look for her keys?"
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(
**inputs,
max_length=200,
temperature=0.1,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
```
### Chat Format
This model supports the Hermes chat format:
```python
def format_chat(messages):
formatted = ""
for message in messages:
role = message["role"]
content = message["content"]
if role == "system":
formatted += f"<|im_start|>system\n{content}<|im_end|>\n"
elif role == "user":
formatted += f"<|im_start|>user\n{content}<|im_end|>\n"
elif role == "assistant":
formatted += f"<|im_start|>assistant\n{content}<|im_end|>\n"
formatted += "<|im_start|>assistant\n"
return formatted
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Solve this math problem: A store has 45 apples. If they sell 1/3 of them in the morning and 1/5 of the remaining apples in the afternoon, how many apples are left?"}
]
prompt = format_chat(messages)
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=300, temperature=0.1)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
```
## Training Details
- **Training Framework**: Axolotl with DeepSpeed Zero2 optimization
- **Hardware**: 8x NVIDIA B200 GPUs (PrimeIntellect cluster)
- **Base Model**: Qwen/Qwen3-8B
- **Training Method**: Low-Rank Adaptation (LoRA)
- **Dataset**: NousResearch/Hermes-3-Dataset
- **Training Duration**: 6 hours
- **Learning Rate**: 0.0004
- **Batch Size**: 8
- **Sequence Length**: 4096
## Evaluation Methodology
All evaluations were conducted using:
- **HellaSwag**: Standard validation set with 4-way multiple choice accuracy
- **GSM8K**: Test set with exact match accuracy on final numerical answers
- **TheoryPlay**: Validation set with accuracy on theory of mind reasoning tasks
## Limitations
- The model may still struggle with very complex mathematical proofs
- Performance on non-English languages may be limited
- May occasionally generate inconsistent responses in edge cases
- Training data cutoff affects knowledge of recent events
## Ethical Considerations
This model has been trained on curated datasets and should be used responsibly. Users should:
- Verify important information from the model
- Be aware of potential biases in training data
- Use appropriate content filtering for production applications
## Citation
```bibtex
@misc{qwen3-hermes8b-v1,
title={Qwen3-Hermes8B-v1: A Fine-tuned Language Model for Reasoning Tasks},
author={[Your Name]},
year={2025},
url={https://huggingface.co/justinj92/Qwen3-Hermes8B-v1}
}
```
## License
This model is released under the Apache 2.0 license.
|