Add multi-architecture support to AQUA Shape Recommender#1335
Closed
Add multi-architecture support to AQUA Shape Recommender#1335
Conversation
- Changed huggingface_hub==0.26.2 to huggingface_hub in opctl extras - Allows installation of latest huggingface_hub version (1.3.7+) - All ADS APIs using huggingface_hub verified compatible with latest version
- Replace deprecated 'huggingface-cli login' with 'hf auth login' in error messages - Remove deprecated 'new_session' parameter from huggingface_hub.login() call
…ence into fix/huggingface-version
- HfHubHTTPError and GatedRepoError now require a 'response' keyword argument in v1.0+ - Updated tests to pass response=MagicMock() when mocking these exceptions
Upgrade shape recommender to support 4 architecture types using strategy pattern: - Text-generation (Llama, Mistral, Qwen, Falcon) - no changes to existing behavior - Multimodal VLMs (LLaVA, Nemotron-VL, Qwen2-VL, InternVL, Phi3-V) - Embedding models (BERT, RoBERTa, E5-Mistral, GTE, ModernBERT) - Audio/ASR (Whisper all sizes) Key changes: - Add ParsedModelConfig with detect_architecture() as single routing point - Add EmbeddingConfig, WhisperConfig, VisionConfig for new architectures - Add memory estimators: VisionMemoryEstimator, EmbeddingMemoryEstimator, WhisperMemoryEstimator - Implement strategy pattern with 4 concrete strategies in new strategies/ package - Add StrategyFactory for architecture-to-strategy routing - Remove text-generation-only gate from _get_model_config() - Add architecture-specific vLLM flags (--limit-mm-per-prompt, --task embedding, etc.) Models previously rejected with "not supported" errors now get proper recommendations. Zero breaking changes - all existing text-generation models work identically. Tested: 9/10 existing tests pass, 1 test has expected behavior change (Whisper now succeeds via new entry point instead of being rejected) Signed-off-by: Aryan Gosaliya <aryan.gosaliya@oracle.com>
|
Member
Author
|
Closing to recreate with clean commit history from main branch |
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
Upgrade shape recommender to support 4 architecture types using strategy pattern: text-generation, multimodal VLMs, embedding models, and audio/ASR.
Changes
New architectures supported:
Key implementation:
ParsedModelConfigwithdetect_architecture()as single routing pointEmbeddingConfig,WhisperConfig,VisionConfigfor new architecturesVisionMemoryEstimator,EmbeddingMemoryEstimator,WhisperMemoryEstimatorstrategies/packageStrategyFactoryfor architecture-to-strategy routing_get_model_config()--limit-mm-per-prompt,--task embedding, etc.)Impact
Testing
Files Changed
constants.py,estimator.py,llm_config.py,recommend.pystrategies/__init__.py,strategies/base.py,strategies/text.py,strategies/multimodal.py,strategies/embedding.py,strategies/audio.pyNext Steps
test_llm_config_unsupported_modelsto validate both entry points