Skip to content

Commit

Permalink
Revert "update docs"
Browse files Browse the repository at this point in the history
This reverts commit 860fc63.
  • Loading branch information
xffxff committed Dec 18, 2024
1 parent 2db70c9 commit f4c840e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions docs/inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ from PIL import Image
from transformers import AutoModelForCausalLM, AutoProcessor

model_id_or_path = "rhymes-ai/Aria"
revision = "4844f0b5ff678e768236889df5accbe4967ec845"

model = AutoModelForCausalLM.from_pretrained(model_id_or_path, revision=revision, device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id_or_path, device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)

processor = AutoProcessor.from_pretrained(model_id_or_path, revision=revision, trust_remote_code=True)
processor = AutoProcessor.from_pretrained(model_id_or_path, trust_remote_code=True)

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

Expand Down Expand Up @@ -97,20 +96,17 @@ from PIL import Image
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams
revision = "4844f0b5ff678e768236889df5accbe4967ec845"
def main():
llm = LLM(
model="rhymes-ai/Aria",
revision=revision,
tokenizer_mode="slow",
dtype="bfloat16",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(
"rhymes-ai/Aria", revision=revision, trust_remote_code=True, use_fast=False
"rhymes-ai/Aria", trust_remote_code=True, use_fast=False
)
messages = [
Expand Down

0 comments on commit f4c840e

Please sign in to comment.