You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✨ Implement automatic model template selection system
- Added comprehensive ModelTemplates class with 10+ model templates
- Integrated auto-template selection in admin panel
- Templates automatically selected based on model ID/name
- Added client-side model-templates.js for UI integration
- Enhanced admin panel with template preview and management
- Added test suite for template selection verification
- Templates persist with model selection in localStorage
- Supports TinyLlama, Phi, Mistral, Llama, CodeLlama, Alpaca, Vicuna, Wizard, Orca, StableLM formats
- Default fallback for unknown models
- Context size auto-adjustment based on model capabilities
The LLM Router now includes an intelligent template auto-selection system that automatically configures the correct chat template format for each model type.
5
+
6
+
## Features
7
+
8
+
### 🎯 Auto-Detection
9
+
- Automatically detects model type from ID and name
10
+
- Selects appropriate chat template without manual configuration
11
+
- Supports 10+ model architectures out of the box
12
+
13
+
### 📋 Supported Model Templates
14
+
15
+
1.**TinyLlama** - `<|system|>`, `<|user|>`, `<|assistant|>` format
16
+
2.**Phi** - Microsoft Phi instruction format
17
+
3.**Mistral/Mixtral** - `[INST]` format
18
+
4.**Llama 2** - Meta's Llama instruction format
19
+
5.**CodeLlama** - Specialized coding assistant format
20
+
6.**Alpaca/Vicuna** - Stanford's instruction format
21
+
7.**Wizard** - WizardLM format
22
+
8.**Orca** - Microsoft Orca format
23
+
9.**StableLM** - Stability AI format
24
+
10.**ChatML** - OpenAI compatible format
25
+
11.**Default** - Generic fallback format
26
+
27
+
### 🔧 How It Works
28
+
29
+
1.**Model Selection**: When a user selects a model in the admin panel
30
+
2.**Pattern Matching**: System analyzes model ID and name
31
+
3.**Template Selection**: Appropriate template is automatically selected
32
+
4.**Configuration Update**: Template settings are applied and saved
33
+
5.**Persistence**: Settings persist across sessions
0 commit comments