1
0
Fork 0
mirror of https://github.com/p-e-w/heretic.git synced 2026-12-03 18:42:57 +07:00

[GH-ISSUE #127] Add multi-model ensemble inference with dynamic routing #70

Closed
opened 2026-11-01 04:17:13 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @swamy18 on GitHub (Feb 7, 2026).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/127

Implementation

Add ensemble model support that automatically routes queries to the most effective model variant based on query type and performance history.

class DynamicModelEnsemble:
    def __init__(self, models, routing_strategy='performance'):
        self.models = models
        self.routing_strategy = routing_strategy
        self.performance_history = {}
    
    def infer(self, prompt, num_models=None):
        # Route to best performing models
        scores = self._calculate_route_scores()
        selected_models = self._select_models(scores, num_models)
        results = [m.infer(prompt) for m in selected_models]
        return self._aggregate_results(results)
    
    def _calculate_route_scores(self):
        # Calculate routing scores based on performance history
        pass
    
    def _select_models(self, scores, num_models):
        # Select top performing models
        pass
    
    def _aggregate_results(self, results):
        # Aggregate results from multiple models
        pass

Benefits

  • Improves overall output quality by using multiple models
  • Learns routing based on actual performance
  • Reduces computational waste on underperforming models
  • Adaptive to changing performance characteristics
Originally created by @swamy18 on GitHub (Feb 7, 2026). Original GitHub issue: https://github.com/p-e-w/heretic/issues/127 # Implementation Add ensemble model support that automatically routes queries to the most effective model variant based on query type and performance history. ```python class DynamicModelEnsemble: def __init__(self, models, routing_strategy='performance'): self.models = models self.routing_strategy = routing_strategy self.performance_history = {} def infer(self, prompt, num_models=None): # Route to best performing models scores = self._calculate_route_scores() selected_models = self._select_models(scores, num_models) results = [m.infer(prompt) for m in selected_models] return self._aggregate_results(results) def _calculate_route_scores(self): # Calculate routing scores based on performance history pass def _select_models(self, scores, num_models): # Select top performing models pass def _aggregate_results(self, results): # Aggregate results from multiple models pass ``` # Benefits - Improves overall output quality by using multiple models - Learns routing based on actual performance - Reduces computational waste on underperforming models - Adaptive to changing performance characteristics
Author
Owner

@p-e-w commented on GitHub (Feb 8, 2026):

This has nothing to do with what Heretic is for. We are not a general-purpose inference engine. Please take a step back and consider things more carefully before dumping a bunch of issues here again.

<!-- gh-comment-id:3866045564 --> @p-e-w commented on GitHub (Feb 8, 2026): This has nothing to do with what Heretic is for. We are not a general-purpose inference engine. Please take a step back and consider things more carefully before dumping a bunch of issues here again.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
p-e-w/heretic#70
No description provided.