Repository navigation
Add Foundry Local deployment skill - #242
Closed
justinchuby wants to merge 1 commit into
Closed
justinchuby wants to merge 1 commit into
justinchuby wants to merge 1 commit into
Conversation
Document the workflow for deploying mobius-exported ONNX models to Microsoft Foundry Local: - Custom model registration via the cache directory - inference_model.json format with common prompt templates (ChatML, Llama, Gemma) - CLI (foundry model run) and OpenAI-compatible API access - Python SDK usage and discovery limitations - Known limitations: bundled GenAI version, no CUDA in pip SDK, multimodal requires GenAI 0.14+, model_type whitelist workaround - Complete end-to-end example from export to local inference Co-authored-by: Copilot <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Member
Author
|
Closing — wrong branch name (gemma4-static-cache). Reopened as a new PR from the correct skill-foundry-local branch. |
Performance Comparison
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new documentation “skill” describing how to deploy mobius-exported ORT GenAI model directories into Microsoft Foundry Local for local inference, including cache registration, inference_model.json prompt templating, and basic CLI/API usage.
Changes:
- Added a new
.agents/skills/foundry-local/SKILL.mdskill document for Foundry Local deployment. - Documented cache-based custom model registration and
inference_model.jsonprompt template examples. - Included runtime notes/limitations and an end-to-end export → register → run walkthrough.
Comment on lines
+39
to
+40
| The output directory must contain `genai_config.json`, tokenizer | ||
| files, and the model sub-directories (decoder/, embedding/, etc.). |
Comment on lines
+70
to
+75
| # Copy all model files | ||
| cp -r output/decoder/ "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" | ||
| cp -r output/embedding/ "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" 2>/dev/null | ||
| cp -r output/vision_encoder/ "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" 2>/dev/null | ||
| cp -r output/audio_encoder/ "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" 2>/dev/null | ||
| cp output/genai_config.json "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" |
Comment on lines
+67
to
+78
| Copy the entire mobius export output into the model directory: | ||
|
|
||
| ```bash | ||
| # Copy all model files | ||
| cp -r output/decoder/ "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" | ||
| cp -r output/embedding/ "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" 2>/dev/null | ||
| cp -r output/vision_encoder/ "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" 2>/dev/null | ||
| cp -r output/audio_encoder/ "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" 2>/dev/null | ||
| cp output/genai_config.json "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" | ||
| cp output/tokenizer* "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" | ||
| cp output/image_processor.json "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" 2>/dev/null | ||
| cp output/audio_processor.json "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" 2>/dev/null |
Comment on lines
+76
to
+78
| cp output/tokenizer* "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" | ||
| cp output/image_processor.json "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" 2>/dev/null | ||
| cp output/audio_processor.json "${CACHE_DIR}/models/Custom/${MODEL_NAME}/" 2>/dev/null |
Comment on lines
+86
to
+88
| cat > "${CACHE_DIR}/models/Custom/${MODEL_NAME}/inference_model.json" << 'EOF' | ||
| { | ||
| "Name": "my-custom-model", |
Comment on lines
+274
to
+275
| unregistered model_type, set `model_type: "decoder"` in | ||
| `genai_config.json` as a workaround. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
justinchuby
added a commit
that referenced
this pull request
May 5, 2026
Document how to deploy mobius-exported ONNX models to Microsoft Foundry Local. ## What this adds New skill at `.agents/skills/foundry-local/SKILL.md` covering: - **Custom model registration** — cache directory structure, file copying, verification - **inference_model.json format** — field reference + common prompt templates (ChatML, Llama, Gemma) - **Running models** — CLI (`foundry model run`), OpenAI-compatible API, Python SDK - **Known limitations** — bundled GenAI version, no CUDA in pip SDK, multimodal requirements, model_type workaround - **End-to-end example** — complete workflow from `mobius build` to local inference Reference: https://techcommunity.microsoft.com/blog/educatordeveloperblog/deploying-custom-models-with-microsoft-olive-and-foundry-local/4489002 Replaces #242 (closed due to wrong branch name). --------- Signed-off-by: Justin Chu <[email protected]> Co-authored-by: Copilot <[email protected]>
26 of 37 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Document how to deploy mobius-exported ONNX models to Microsoft Foundry Local.
What this adds
New skill at
.agents/skills/foundry-local/SKILL.mdcovering:foundry model run), OpenAI-compatible API, Python SDKmobius buildto local inferenceReference: https://techcommunity.microsoft.com/blog/educatordeveloperblog/deploying-custom-models-with-microsoft-olive-and-foundry-local/4489002