Update README.md
Browse files
README.md
CHANGED
@@ -28,7 +28,7 @@ import torch
|
|
28 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
29 |
device = "cuda" # you can use "auto" for placing the model on several GPUs if your GPUs can not fit the model
|
30 |
path = "nicolinho/QRM-Gemma-2-27B"
|
31 |
-
model = AutoModelForSequenceClassification.from_pretrained(path, torch_dtype=torch.bfloat16, device_map=device, trust_remote_code=True)
|
32 |
tokenizer = AutoTokenizer.from_pretrained(path, use_fast=True)
|
33 |
# We load a random sample from the validation set of the HelpSteer dataset
|
34 |
prompt = 'Does pineapple belong on a Pizza?'
|
|
|
28 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
29 |
device = "cuda" # you can use "auto" for placing the model on several GPUs if your GPUs can not fit the model
|
30 |
path = "nicolinho/QRM-Gemma-2-27B"
|
31 |
+
model = AutoModelForSequenceClassification.from_pretrained(path, torch_dtype=torch.bfloat16, attn_implementation="flash_attention_2", device_map=device, trust_remote_code=True)
|
32 |
tokenizer = AutoTokenizer.from_pretrained(path, use_fast=True)
|
33 |
# We load a random sample from the validation set of the HelpSteer dataset
|
34 |
prompt = 'Does pineapple belong on a Pizza?'
|