-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Enable XPU doc #38929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable XPU doc #38929
Conversation
Convert this PR to draft mode for verifying FP8. |
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
@@ -175,7 +175,7 @@ processed_chat = processor.apply_chat_template( | |||
add_generation_prompt=True, | |||
tokenize=True, | |||
return_dict=True, | |||
video_fps=32, | |||
video_fps=16, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
video_fps=32 will cause error: ValueError: When loading the video with fps=32, we computed num_frames=320 which exceeds total_num_frames=300. Check fps or video meta data.
. Fixed by reducing video_fps.
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! cc @MekkCyber for quick review as well please 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for adding this ! left minor nits
@@ -47,7 +47,7 @@ quantized_model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=" | |||
|
|||
tokenizer = AutoTokenizer.from_pretrained(model_name) | |||
input_text = "What are we having for dinner?" | |||
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda") | |||
input_ids = tokenizer(input_text, return_tensors="pt").to(quantized_model.device.type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do xpu support fp8 (torch.float8_e4m3fn) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I've been verified on XPU.
<hfoption id="int8_dynamic_activation_int8_weight-and-int8_weight_only"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to keep the previous version! it's more consize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Hi @SunMarc . This PR enables XPU torchao example in the doc, and also fixed a minor bug on the doc. Please review it. Thanks!