Skip to content

make examples under doc device agnostic - #47812

Merged
stevhliu merged 6 commits into
huggingface:mainfrom
kaixuanliu:doc-device
Aug 7, 2026
Merged

make examples under doc device agnostic#47812
stevhliu merged 6 commits into
huggingface:mainfrom
kaixuanliu:doc-device

Conversation

@kaixuanliu

@kaixuanliu kaixuanliu commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

CI

@stevhliu @IlyasMoutawwakil pls help review, thx!

Signed-off-by: kaixuanliu <kaixuan.liu@intel.com>
Signed-off-by: kaixuanliu <kaixuan.liu@intel.com>

@stevhliu stevhliu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Comment thread docs/source/en/llm_tutorial_optimization.md Outdated
self.end_event = None

def __enter__(self):
# Use CUDA events for more accurate GPU timing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the context here was in using CUDA graphs, so i'd undo this change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have reverted.

Comment thread docs/source/en/model_doc/qwen3_asr.md Outdated

processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id, dtype=torch.bfloat16).to("cuda")
model = AutoModelForTokenClassification.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

context here was also in using an A100, so i'd also revert this change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't notice it, have updated the code.

Comment thread docs/README.md Outdated
Comment thread docs/README.md Outdated
kaixuanliu and others added 4 commits August 7, 2026 08:55
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Signed-off-by: kaixuanliu <kaixuan.liu@intel.com>
@kaixuanliu
kaixuanliu marked this pull request as ready for review August 7, 2026 01:13
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 31137134977:2
Result: success | Jobs: 2 | Tests: 10 | Failures: 0 | Duration: 40s

@stevhliu
stevhliu added this pull request to the merge queue Aug 7, 2026
Merged via the queue into huggingface:main with commit 9436284 Aug 7, 2026
32 checks passed
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants