From f4c840ed90ecd1dc7407a129e08329b468655ecb Mon Sep 17 00:00:00 2001 From: xffxff <1247714429@qq.com> Date: Wed, 18 Dec 2024 10:50:12 +0800 Subject: [PATCH] Revert "update docs" This reverts commit 860fc631842812f17f9f9416671db9fad4b299cc. --- docs/inference.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/inference.md b/docs/inference.md index 5c9d12f..2954e89 100644 --- a/docs/inference.md +++ b/docs/inference.md @@ -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" @@ -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 = [