Text Classification
Transformers
Safetensors
English
Chinese
qwen2
feature-extraction
reward model
custom_code
text-embeddings-inference
Instructions to use Qwen/Qwen2.5-Math-RM-72B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen2.5-Math-RM-72B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Qwen/Qwen2.5-Math-RM-72B", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Math-RM-72B", trust_remote_code=True) model = AutoModel.from_pretrained("Qwen/Qwen2.5-Math-RM-72B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_qwen2_rm.py
Browse files- modeling_qwen2_rm.py +2 -2
modeling_qwen2_rm.py
CHANGED
|
@@ -48,8 +48,8 @@ from transformers.utils import (
|
|
| 48 |
from .configuration_qwen2_rm import Qwen2RMConfig as Qwen2Config
|
| 49 |
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|
| 53 |
|
| 54 |
|
| 55 |
logger = logging.get_logger(__name__)
|
|
|
|
| 48 |
from .configuration_qwen2_rm import Qwen2RMConfig as Qwen2Config
|
| 49 |
|
| 50 |
|
| 51 |
+
if is_flash_attn_2_available():
|
| 52 |
+
from transformers.modeling_flash_attention_utils import _flash_attention_forward
|
| 53 |
|
| 54 |
|
| 55 |
logger = logging.get_logger(__name__)
|