Support HuggingFace completion prompts for non-Llama models#266
Open
mitre88 wants to merge 1 commit into
Open
Conversation
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.
Summary
completionprompt path so non-Llama generation endpoints can construct prompts instead of failing in prompt construction.KeyError('model_tag')path with an actionable error for unsupported HuggingFace chat mode.Why
Issue #221 reports an unhandled
KeyError('model_tag')when trying to evaluate a HuggingFace model such asmicrosoft/phi-2. The prompt constructor referenced a missingmodel_tagconfig key before it could give a useful error or allow a completion-mode prompt.Validation
REDDIT=http://reddit.local SHOPPING=http://shopping.local SHOPPING_ADMIN=http://shopping-admin.local GITLAB=http://gitlab.local WIKIPEDIA=http://wikipedia.local MAP=http://map.local HOMEPAGE=http://homepage.local uv run --python 3.11 --with pytest==7.1.2 --with pytest-asyncio --with gymnasium --with playwright==1.32.1 --with beartype==0.12.0 --with tiktoken --with transformers==4.33.2 --with openai==0.27.0 --with aiolimiter --with nltk --with text-generation --with Pillow python -m pytest tests/test_prompt_constructor.py -qgit diff --checkNote: I used Python 3.11 for local validation on Apple Silicon because Playwright 1.32.1 depends on greenlet 2.0.1, whose Python 3.10 macOS wheel is x86_64-only and failed to build locally on arm64.
/claim https://algora.io/PrimeIntellect-ai/bounties/U3xSkpanaVo8u1sT