microsoft / microsoft/ai-dev-gallery

[FEATURE] Add genai config prompt template parser

Open
#142 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
1.5k
Forks
223
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
We currently maintain prompt templates per model class but that is not scalable. Most models contain a prompt template in the tokenizer_config.json that we could parse and use instead.

Describe the solution you'd like
Create a Jinja parser to parse the templates in the tokenizer_config.json to use as a template for gen ai models

Additional context
https://huggingface.co/docs/transformers/en/chat_templating

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing per-model prompt-template handling and the prompt templates in tokenizer_config.json, then consult the linked Hugging Face chat-templating documentation. Done means gen AI models can use templates parsed from tokenizer_config.json instead of maintaining templates separately for each model class.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
ai, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.