Skip to content

Conversation

@jackzhxng
Copy link
Contributor

@jackzhxng jackzhxng commented Jul 10, 2025

Summary

Structure:

  • New Getting Started page
  • AOT (export)
    • Old getting started page, which was the NanoGPT tutorial, is moved to export-custom-llm.md, with the runner sections removed to add to the run-with-c-plus-plus.md
    • New export-llm.md page for exporting LLMs with export_llm API
  • Runtime
    • iOS/Android app docs remain, they detail steps to take after the .pte is generated for running on-device
    • Added a C++ runner page for @larryliu0820 to fill out with the new runner APIs
    • Since the QNN Llama tutorial is highly custom, we are going to leave the export section in it as well instead of dividing like we did for the rest of the tutorials

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 10, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12381

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures

As of commit ff92c9c with merge base dd4488d (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 10, 2025
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@jackzhxng jackzhxng force-pushed the jz/export-llm-docs branch 20 times, most recently from 89e52e9 to 0ffe50a Compare July 11, 2025 22:13
@jackzhxng jackzhxng requested a review from larryliu0820 July 11, 2025 22:15
@jackzhxng jackzhxng force-pushed the jz/export-llm-docs branch from 0ffe50a to dc267a8 Compare July 14, 2025 18:36
@jackzhxng jackzhxng changed the base branch from main to export-llm-docs July 14, 2025 18:36
@jackzhxng jackzhxng marked this pull request as ready for review July 14, 2025 18:36
@shoumikhin
Copy link
Contributor

Please make a placeholder for ObjC/Swift runtime APIs and i'll fill it out

@jackzhxng jackzhxng force-pushed the jz/export-llm-docs branch from 6fda1ef to 1b2fd42 Compare July 16, 2025 23:23
@jackzhxng
Copy link
Contributor Author

@shoumikhin I have left the existing llama-demo-ios.md untouched and linked to it from getting-started.md, feel free to make any changes to llama-demo-ios.md that you need

Copy link
Contributor

@mergennachin mergennachin left a comment

Choose a reason for hiding this comment

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

export-llm is a great page, thank you for working on this

@shoumikhin
Copy link
Contributor

Instead of llama-demo-ios.md we should probably just point to examples/demo-apps/apple_ios/LLaMA/README.md?
I meant some place in the docs where we describe the LLM runtime API in C++ and how to use it. I can append some info on ObjC/Swift API there.

@jackzhxng jackzhxng force-pushed the jz/export-llm-docs branch from 46cfe37 to 1a3e422 Compare July 19, 2025 00:21
@jackzhxng
Copy link
Contributor Author

@shoumikhin sure, feel free to open a PR against this!


Create a file called export_nanogpt.py with the following contents:

```python
Copy link
Contributor

Choose a reason for hiding this comment

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

so much code (I know you are just moving here) in an .md is just waiting to get outdated. Is there an alternative like a notebook or something (which is also in CI)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it'd be good to put into a notebook maybe

jackzhxng and others added 6 commits July 21, 2025 15:55
Co-authored-by: Anthony Shoumikhin <[email protected]>
### Summary
[PLEASE REMOVE] See [CONTRIBUTING.md's Pull
Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests)
for ExecuTorch PR guidelines.

[PLEASE REMOVE] If this PR closes an issue, please add a `Fixes
#<issue-id>` line.

[PLEASE REMOVE] If this PR introduces a fix or feature that should be
the upcoming release notes, please add a "Release notes: <area>" label.
For a list of available release notes labels, check out
[CONTRIBUTING.md's Pull
Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests).

### Test plan
[PLEASE REMOVE] How did you test this PR? Please write down any manual
commands you used and note down tests that you have written if
applicable.
@jackzhxng jackzhxng merged commit 01b7e7d into export-llm-docs Jul 23, 2025
93 of 95 checks passed
@jackzhxng jackzhxng deleted the jz/export-llm-docs branch July 23, 2025 19:37
@jackzhxng
Copy link
Contributor Author

@pytorchbot cherry-pick --onto release/0.7 -c docs

pytorchbot pushed a commit that referenced this pull request Jul 23, 2025
@pytorchbot
Copy link
Collaborator

Cherry picking #12381

The cherry pick PR is at #12757 The following tracker issues are updated:

Details for Dev Infra team Raised by workflow job

jackzhxng added a commit that referenced this pull request Jul 29, 2025
Merge #12381 from side branch
into main.

---------

Co-authored-by: Gasoonjia <[email protected]>
Co-authored-by: Mergen Nachin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants