Skip to content

Commit 860fc63

Browse files
committed
update docs
1 parent 483af3d commit 860fc63

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/inference.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ from PIL import Image
1414
from transformers import AutoModelForCausalLM, AutoProcessor
1515

1616
model_id_or_path = "rhymes-ai/Aria"
17+
revision = "4844f0b5ff678e768236889df5accbe4967ec845"
1718

18-
model = AutoModelForCausalLM.from_pretrained(model_id_or_path, device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)
19+
model = AutoModelForCausalLM.from_pretrained(model_id_or_path, revision=revision, device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)
1920

20-
processor = AutoProcessor.from_pretrained(model_id_or_path, trust_remote_code=True)
21+
processor = AutoProcessor.from_pretrained(model_id_or_path, revision=revision, trust_remote_code=True)
2122

2223
image_path = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png"
2324

@@ -96,17 +97,20 @@ from PIL import Image
9697
from transformers import AutoTokenizer
9798
from vllm import LLM, SamplingParams
9899
100+
revision = "4844f0b5ff678e768236889df5accbe4967ec845"
101+
99102
100103
def main():
101104
llm = LLM(
102105
model="rhymes-ai/Aria",
106+
revision=revision,
103107
tokenizer_mode="slow",
104108
dtype="bfloat16",
105109
trust_remote_code=True,
106110
)
107111
108112
tokenizer = AutoTokenizer.from_pretrained(
109-
"rhymes-ai/Aria", trust_remote_code=True, use_fast=False
113+
"rhymes-ai/Aria", revision=revision, trust_remote_code=True, use_fast=False
110114
)
111115
112116
messages = [

0 commit comments

Comments
 (0)