Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/algorithmicsuperintelligence/optillm
/ functions
Functions
1,129 in github.com/algorithmicsuperintelligence/optillm
⨍
Functions
1,129
◇
Types & classes
178
↳
Endpoints
25
↓ 2 callers
Method
reset
Reset processor state for new query.
optillm/deepconf/processor.py:83
↓ 2 callers
Method
reset
Reset the hook state for a new generation.
optillm/autothink/steering.py:822
↓ 2 callers
Method
select_action
(self, node: Node)
optillm/rstar.py:126
↓ 2 callers
Function
set_global_logger
Set the global logger instance (called by optillm.py)
optillm/conversation_logger.py:251
↓ 2 callers
Function
should_use_mlx
Determine if a model should use MLX instead of PyTorch
optillm/inference.py:234
↓ 2 callers
Function
split_into_granular_chunks
Splits long text into granular, token-length-constrained chunks using sentence boundaries. Sentences are first extracted using a delimiter p
optillm/plugins/longcepo/chunking.py:124
↓ 2 callers
Function
split_sentences
Splits text into sentences or segments based on a given delimiter while preserving punctuation. For punctuation-based splitters (e.g., ".",
optillm/plugins/longcepo/chunking.py:94
↓ 2 callers
Function
stop_test_server
Stop the test server
tests/test_utils.py:65
↓ 2 callers
Method
trajectory_score
(self, trajectory: List[Node])
optillm/rstar.py:223
↓ 2 callers
Method
try_match
Try to match the current context with a steering vector. Only allows one pattern to be selected for the entire generation. Tr
optillm/autothink/steering.py:577
↓ 2 callers
Method
update_context
Update the context buffer with new tokens. Args: new_tokens: New tokens to add to the context.
optillm/autothink/steering.py:491
↓ 2 callers
Function
validate
(model, val_dataloader)
scripts/train_optillm_classifier.py:197
↓ 2 callers
Function
validate_report_completeness
Validate that the research report is complete and ready for publication. Checks for: - Placeholder citations - Incomplete sectio
optillm/plugins/deep_research/research_engine.py:194
↓ 2 callers
Method
verify_solutions_parallel
Run comprehensive verification on all solutions in workspace with parallel execution
optillm/mars/verifier.py:55
↓ 1 callers
Method
__init__
(self, prompts, approaches, ranks, tokens, tokenizer)
scripts/train_optillm_classifier.py:25
↓ 1 callers
Method
__init__
(self, response_delay=0.1, reasoning_tokens=2000)
tests/test_mars_imo25.py:24
↓ 1 callers
Method
__init__
(self, cache_manager)
optillm/inference.py:593
↓ 1 callers
Method
_adapt_modules
ADAPT: Rephrase modules to be more task-specific.
optillm/plugins/deepthink/self_discover.py:138
↓ 1 callers
Method
_apply_defaults
Apply sensible defaults to configuration. Args: config: Configuration dictionary Returns:
optillm/plugins/proxy/config.py:126
↓ 1 callers
Method
_assign_temperature
Assign temperature based on agent ID for 3-agent configuration
optillm/mars/agent.py:29
↓ 1 callers
Method
_calculate_answer_consistency
Calculate consistency of final answers.
optillm/plugins/deepthink/uncertainty_cot.py:249
↓ 1 callers
Method
_calculate_reasoning_consistency
Calculate consistency of reasoning processes.
optillm/plugins/deepthink/uncertainty_cot.py:285
↓ 1 callers
Method
_check_existing_server
Check if OptILLM server is already running
tests/test_conversation_logging_server.py:73
↓ 1 callers
Method
_check_provider
Check health of a single provider
optillm/plugins/proxy/health.py:46
↓ 1 callers
Method
_check_server_health
Check if server is healthy
tests/test_conversation_logging_server.py:82
↓ 1 callers
Method
_classify_problem_type
Classify the problem type for strategy matching
optillm/mars/strategy_network.py:315
↓ 1 callers
Function
_clean_response
Clean up the final response.
optillm/plugins/deepthink_plugin.py:241
↓ 1 callers
Method
_cleanup_old_sessions
Clean up sessions older than max_session_age.
optillm/plugins/deep_research/session_state.py:76
↓ 1 callers
Method
_compute_token_entropy
Compute token distribution entropy
optillm/inference.py:796
↓ 1 callers
Method
_count_strategies_by_type
Count strategies by problem type
optillm/mars/strategy_network.py:575
↓ 1 callers
Method
_create_batch_processor
Create and start a batch processor thread for a specific queue Args: queue_key: The key identifying the queue/mo
optillm/batching.py:129
↓ 1 callers
Method
_create_default
Create default configuration file.
optillm/plugins/proxy/config.py:222
↓ 1 callers
Function
_create_enhanced_prompt
Create an enhanced prompt that incorporates the reasoning structure.
optillm/plugins/deepthink_plugin.py:187
↓ 1 callers
Method
_create_processor
Create the internal processor instance.
optillm/autothink/autothink.py:55
↓ 1 callers
Method
_detect_client_type
Detect the type of client based on class name
optillm/plugins/deep_research_plugin.py:29
↓ 1 callers
Method
_detect_devices
(self)
optillm/inference.py:964
↓ 1 callers
Method
_discover_approaches
Discover built-in approaches from optillm package
optillm/plugins/proxy/approach_handler.py:63
↓ 1 callers
Method
_discover_handlers
Discover available approaches and plugins dynamically
optillm/plugins/proxy/approach_handler.py:51
↓ 1 callers
Method
_discover_plugins
Discover available plugins dynamically
optillm/plugins/proxy/approach_handler.py:107
↓ 1 callers
Method
_ensure_population_size
Ensure we have minimum population size for effective aggregation
optillm/mars/aggregator.py:326
↓ 1 callers
Method
_estimate_confidence
Estimate confidence based on solution characteristics
optillm/mars/agent.py:284
↓ 1 callers
Method
_evaluate_confidence
Evaluate confidence based on consistency across samples. Returns a confidence score between 0 and 1.
optillm/plugins/deepthink/uncertainty_cot.py:209
↓ 1 callers
Method
_extract_aime_answer
Extract AIME-style numeric answers (integers 0-999)
optillm/utils/answer_extraction.py:201
↓ 1 callers
Method
_extract_general_answer
General fallback answer extraction patterns
optillm/utils/answer_extraction.py:246
↓ 1 callers
Method
_extract_imo_specific
Extract answers for specific IMO 2025 problems
optillm/utils/answer_extraction.py:100
↓ 1 callers
Method
_extract_query
Extract the query from messages for classification. Args: messages: List of message dictionaries
optillm/autothink/processor.py:380
↓ 1 callers
Method
_extract_strategy_async
Extract strategy from a single agent solution
optillm/mars/strategy_network.py:113
↓ 1 callers
Function
_extract_task_description
Extract a task description for SELF-DISCOVER from the query and system prompt.
optillm/plugins/deepthink_plugin.py:150
↓ 1 callers
Method
_find_optimal_batch_size
Find optimal batch size through binary search with memory monitoring
optillm/inference.py:1407
↓ 1 callers
Function
_format_messages_for_model
Format messages based on whether the model supports system messages.
optillm/plugins/proxy_plugin.py:78
↓ 1 callers
Method
_format_messages_for_provider
Format messages based on provider's system message support
optillm/plugins/proxy/client.py:210
↓ 1 callers
Method
_generate_aggregated_solutions
Generate new solutions by aggregating sampled solutions in parallel
optillm/mars/aggregator.py:169
↓ 1 callers
Method
_generate_greedy_sample
Generate a single greedy sample with temperature=0.
optillm/plugins/deepthink/uncertainty_cot.py:149
↓ 1 callers
Method
_generate_multiple_samples
Generate multiple samples by calling the API multiple times.
optillm/plugins/deepthink/uncertainty_cot.py:114
↓ 1 callers
Method
_generate_request_id
Generate a unique request ID
optillm/conversation_logger.py:58
↓ 1 callers
Method
_generate_strategy_enhanced_solution_async
Generate enhanced solution using peer strategies
optillm/mars/strategy_network.py:408
↓ 1 callers
Method
_get_effective_strategies_for_type
Get most effective strategies for the given problem type
optillm/mars/strategy_network.py:383
↓ 1 callers
Method
_get_effectiveness_stats
Get overall effectiveness statistics
optillm/mars/strategy_network.py:604
↓ 1 callers
Method
_get_last_index
Get the last index for a given entity type.
optillm/plugins/privacy_plugin.py:51
↓ 1 callers
Method
_get_minimal_config
Return minimal working config as fallback.
optillm/plugins/proxy/config.py:267
↓ 1 callers
Method
_get_most_effective_strategies
Get most effective strategies across all problem types
optillm/mars/strategy_network.py:582
↓ 1 callers
Method
_get_request_key
Generate key to group compatible requests Args: request_data: The request data dictionary R
optillm/batching.py:82
↓ 1 callers
Function
_get_system_message_support
Get cached system message support status, testing if not cached. Thread-safe with locking.
optillm/plugins/proxy_plugin.py:63
↓ 1 callers
Method
_get_top_alternatives
Calculate top alternative tokens and their logprobs
optillm/inference.py:138
↓ 1 callers
Method
_implement_structure
IMPLEMENT: Create a structured reasoning plan in JSON format.
optillm/plugins/deepthink/self_discover.py:194
↓ 1 callers
Method
_interpolate_env_vars
Recursively replace ${VAR} and ${VAR:-default} with environment values. Args: obj: Object to process (dict, list
optillm/plugins/proxy/config.py:84
↓ 1 callers
Method
_load
Load strategies and metrics from disk.
optillm/plugins/spl/strategy.py:151
↓ 1 callers
Method
_load_mlx_model
Load MLX model and tokenizer with caching
optillm/inference.py:323
↓ 1 callers
Method
_load_model
Load the classification model using adaptive-classifier library.
optillm/autothink/classifier.py:34
↓ 1 callers
Function
_log_solution_overview
Log comprehensive overview of all solutions before synthesis
optillm/mars/mars.py:613
↓ 1 callers
Method
_majority_vote_response
Create response based on majority vote of answers and best reasoning.
optillm/plugins/deepthink/uncertainty_cot.py:309
↓ 1 callers
Method
_make_request_with_timeout
Make a request with timeout handling
optillm/plugins/proxy/client.py:246
↓ 1 callers
Method
_merge_two_strategies
Merge two similar strategies into one.
optillm/plugins/spl/strategy.py:486
↓ 1 callers
Method
_normalize_math_verify_result
Normalize math-verify result to appropriate format
optillm/utils/answer_extraction.py:78
↓ 1 callers
Function
_parse_config
Parse and validate configuration parameters.
optillm/plugins/deepthink_plugin.py:117
↓ 1 callers
Method
_parse_explicit_set
Parse explicit set like '0, 1, 3
optillm/utils/answer_extraction.py:196
↓ 1 callers
Method
_parse_json_structure
Parse JSON structure with robust error handling and cleanup.
optillm/plugins/deepthink/self_discover.py:268
↓ 1 callers
Method
_parse_set_with_ellipsis
Parse set notation with ellipsis like '0, 1, 2, ..., n
optillm/utils/answer_extraction.py:175
↓ 1 callers
Method
_parse_strategy_analysis
Parse structured strategy analysis response
optillm/mars/strategy_network.py:228
↓ 1 callers
Method
_parse_verification
Parse verification result to extract structured information
optillm/mars/agent.py:319
↓ 1 callers
Method
_process_batch
Process a batch of requests Args: batch: List of batch requests to process
optillm/batching.py:185
↓ 1 callers
Method
_process_dataset_item
Process a dataset item into a steering vector. Args: item: Dataset item Returns:
optillm/autothink/steering.py:109
↓ 1 callers
Function
_run_exploration_phase_parallel
Run the multi-agent exploration phase with parallel execution
optillm/mars/mars.py:325
↓ 1 callers
Function
_run_mars_parallel
Async implementation of MARS with parallel execution
optillm/mars/mars.py:101
↓ 1 callers
Method
_run_single_aggregation_loop
Run a single aggregation loop: sample K -> aggregate -> update population
optillm/mars/aggregator.py:93
↓ 1 callers
Method
_sample_solutions_for_aggregation
Sample K solutions from population for aggregation Uses different strategies for each sample to maintain diversity
optillm/mars/aggregator.py:122
↓ 1 callers
Method
_select_modules
SELECT: Choose relevant reasoning modules for the task.
optillm/plugins/deepthink/self_discover.py:68
↓ 1 callers
Method
_select_verifier_agent
Select an agent different from the solution creator for verification
optillm/mars/verifier.py:181
↓ 1 callers
Method
_setup_steering
Set up steering vector management.
optillm/autothink/processor.py:114
↓ 1 callers
Method
_start_server_with_logging
Start server with conversation logging enabled
tests/test_conversation_logging_server.py:91
↓ 1 callers
Function
_synthesize_final_solution
Synthesize the final solution from all agent outputs and verifications
optillm/mars/mars.py:379
↓ 1 callers
Function
_test_system_message_support
Test if a model supports system messages by making a minimal test request. Returns True if supported, False otherwise.
optillm/plugins/proxy_plugin.py:29
↓ 1 callers
Method
_test_system_message_support
Test if a model supports system messages
optillm/plugins/proxy/client.py:179
↓ 1 callers
Method
_try_math_verify
Try to extract answer using math-verify library
optillm/utils/answer_extraction.py:67
↓ 1 callers
Method
_try_text_match
Try to match using text-based context (original approach).
optillm/autothink/steering.py:760
↓ 1 callers
Method
_try_token_match
Try to match using token-based context (similar to guided mode).
optillm/autothink/steering.py:609
↓ 1 callers
Method
_update_group_confidence
Update group confidence based on current sliding window.
optillm/deepconf/confidence.py:102
↓ 1 callers
Method
_update_population
Update population with new solutions, maintaining population size limit
optillm/mars/aggregator.py:306
↓ 1 callers
Method
_validate_batch_compatibility
Validate that all requests in batch are compatible Args: requests: List of batch requests R
optillm/batching.py:101
↓ 1 callers
Method
_validate_config
Validate configuration structure and values. Args: config: Configuration to validate Return
optillm/plugins/proxy/config.py:181
← previous
next →
201–300 of 1,129, ranked by callers