[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-24。"],[],[],null,["# Convert generative PyTorch models\n\nThe [AI Edge Torch Generative\nAPI](https://github.com/google-ai-edge/ai-edge-torch/tree/main/ai_edge_torch/generative/)\nis a mobile-optimized library for converting transformer-based PyTorch models to\nthe LiteRT format, enabling you to convert Large Language Models (LLMs) for\non-device image and text generation with LiteRT and MediaPipe. The AI Edge Torch Generative API is currently CPU-only, with planned GPU and NPU support.\n\nMobile app developers can use the Edge Generative API to integrate PyTorch LLMs\nwith the [MediaPipe LLM Inference\nAPI](../../mediapipe/solutions/genai/llm_inference/index) to create apps that\nrun those converted PyTorch models completely on-device.\n\nFor more information, see the Generative Torch API [GitHub\nrepo](https://github.com/google-ai-edge/ai-edge-torch/tree/main/ai_edge_torch/generative/)."]]