Skip to content

Feature/inference throughput logging#747

Merged
Luodian merged 9 commits into
dev/v0d4from
feature/inference-throughput-logging
Jul 13, 2025
Merged

Feature/inference throughput logging#747
Luodian merged 9 commits into
dev/v0d4from
feature/inference-throughput-logging

Conversation

@Luodian
Copy link
Copy Markdown
Contributor

@Luodian Luodian commented Jul 9, 2025

Before you open a pull-request, please check if a similar issue already exists or has been closed before.

When you open a pull-request, please be sure to include the following

  • A descriptive title: [xxx] XXXX
  • A detailed description

If you meet the lint warnings, you can use following scripts to reformat code.

pip install pre-commit
pre-commit install
pre-commit run --all-files

Thank you for your contributions!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 9, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Collaborator

@kcz358 kcz358 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea and most of the implementation looks okay. But the format seems to be inconsistent for each model. I would see if I can create a context manager for this or fix the algorithm format. Also, are TTFT and TPOT necessary in our current settings? I think currently are all estimation so I feel this is a bit inaccurate and maybe tokens per second would be enough to log everything

Luodian and others added 2 commits July 10, 2025 19:19
Implements TPOT (Time Per Output Token) and inference speed metrics:
- TPOT = (e2e_latency - TTFT) / (num_output_tokens - 1)
- Inference Speed = 1 / TPOT tokens/second

Modified chat models:
- openai_compatible.py: API call timing with token counting
- vllm.py: Batch-level timing with per-request metrics
- sglang.py: Timing with meta_info extraction
- huggingface.py: Batch processing with token calculation
- llava_hf.py: Single-request timing with error handling
- qwen2_5_vl.py: Batch timing implementation

Features:
- Precise timing around model.generate() calls
- TTFT estimation when not available from model
- Comprehensive logging with formatted metrics
- Batch processing support
- Error handling for robustness

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kcz358 kcz358 force-pushed the feature/inference-throughput-logging branch from f75f812 to 740cbc0 Compare July 11, 2025 02:19
@Luodian
Copy link
Copy Markdown
Contributor Author

Luodian commented Jul 11, 2025

I think the idea and most of the implementation looks okay. But the format seems to be inconsistent for each model. I would see if I can create a context manager for this or fix the algorithm format. Also, are TTFT and TPOT necessary in our current settings? I think currently are all estimation so I feel this is a bit inaccurate and maybe tokens per second would be enough to log everything

Let me check, I think we should only implement this in chat models as standard guidance to community developers. So dont necessarily introduce more abstraction. I think TTFT/TPOT is from vllm/sglang's metrics so I keep it, let me dig deeper or you could start commit to revise it.

@Luodian Luodian marked this pull request as ready for review July 13, 2025 08:42
@Luodian Luodian merged commit cdc1043 into dev/v0d4 Jul 13, 2025
3 checks passed
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Conditional Variable Usage Causes Error

The avg_speed variable is conditionally defined only when len(outputs) > 1. If len(outputs) <= 1, avg_speed remains undefined, causing a NameError when it is subsequently used in the metric_dict.

lmms_eval/models/chat/sglang.py#L183-L195

if len(outputs) > 1:
avg_speed = total_tokens / e2e_latency if e2e_latency > 0 else 0
assert len(response_text) == len(batch_requests)
res.extend(response_text)
pbar.update(len(batch_requests))
metric_dict = {
"total_tokens": total_tokens,
"e2e_latency": e2e_latency,
"avg_speed": avg_speed,
}
log_metrics(**metric_dict)

Fix in CursorFix in Web


Bug: Model Generation Exception Causes Decoding Error

When an exception occurs during model generation, cont is set to an empty string. This leads to a TypeError when self.tokenizer.batch_decode() is subsequently called, as it expects a tensor or list of token IDs instead of a string. The conditional check if cont != "" else "" is insufficient to prevent this issue, and the comparison itself can be fragile when cont is a tensor.

lmms_eval/models/chat/llava_hf.py#L107-L114

except Exception as e:
eval_logger.error(f"Error {e} in generating")
cont = ""
e2e_latency += 0
total_tokens += 0
text_outputs = self.tokenizer.batch_decode(cont, skip_special_tokens=True)[0] if cont != "" else ""

Fix in CursorFix in Web


BugBot free trial expires on July 22, 2025
Learn more in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

kcz358 added a commit that referenced this pull request Jul 30, 2025
* Update task utils and logger

* [Main Update] Doc to messages feature support and Split simple and chat mode (#692)

* Update deps

* Restructured

* Delete models

* Remove deprecated models

* Set up auto doc to messages and chat models

* Lint

* Allow force simple mode

* Add auto doc to messages for audio and video

Fix lint

Init server structure

Restructure to server folder

Clean base and providers

Add clean method for models

Fix loggers save result

Fix dummy server error

Suppress llava warnings

Sample evaluator on llava in the wild

Update mmmu doc to messages

Update version

* Add judge server implementation with various providers and evaluation protocols

Add AsyncAzureOpenAIProvider implementation and update provider factory

Refactor sample saving in EvaluationTracker to use cleaned data and improve logging

Add llm_as_judge_eval metric to multiple tasks and integrate llm_judge API for evaluation

* Refactor MathVerseEvaluator to utilize llm_judge server for response generation and evaluation, enhancing API integration and error handling. Update MMBench_Evaluator to streamline API key handling based on environment variables.

* Refactor EvaluationTracker to directly modify sample data for improved clarity and efficiency. Update MathVerseEvaluator to streamline answer scoring by eliminating unnecessary extraction steps and enhance evaluation prompts. Remove deprecated metrics from configuration files.

* Refactor MathVistaEvaluator to integrate llm_judge server for enhanced response generation and evaluation. Streamline API configuration and error handling by removing direct API key management and utilizing a custom server configuration for requests.

* Update MathVista task configurations to replace 'gpt_eval_score' with 'llm_as_judge_eval' across multiple YAML files and adjust the result processing function accordingly. This change aligns with the integration of the llm_judge server for enhanced evaluation metrics.

* Add new OlympiadBench task configurations for mathematics and physics evaluation. Introduce 'olympiadbench_OE_MM_maths_en_COMP.yaml' and 'olympiadbench_OE_MM_physics_en_COMP.yaml' files, while removing outdated English and Chinese test configurations. Update evaluation metrics to utilize 'llm_as_judge_eval' for consistency across tasks.

* Add reasoning model utility functions and integrate into Qwen2_5_VL model. Introduced `parse_reasoning_model_answer` to clean model responses and updated answer processing in the Qwen2_5_VL class to utilize this new function, enhancing response clarity and logging.

* Update OlympiadBench task configuration to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Refactor olympiadbench_process_results to enhance response clarity. Updated the return format to include question, response, and ground truth for improved evaluation context. Simplified judge result determination logic.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for consistency with recent configuration updates and improved clarity in response generation.

* Add launcher and sglang launcher for local llm as judge

* Lint

* add new tasks MMVU and Visual Web Bench (#727)

* add mmvu task

* fix linting videomathqa

* fix mmvu to use llm judge

* add visualwebbench task

* Add Qwen2_5 chat to support doc_to_messages

* Refactor documentation and codebase to standardize naming conventions from 'lm_eval' to 'lmms_eval'. Update task configurations and evaluation metrics accordingly for consistency across the project.

* Update model guide and task configurations to replace 'max_gen_toks' with 'max_new_tokens' for consistency across YAML files and documentation. This change aligns with recent updates in the generation parameters for improved clarity in model behavior.

* Update task utils and logger

* [Main Update] Doc to messages feature support and Split simple and chat mode (#692)

* Update deps

* Restructured

* Delete models

* Remove deprecated models

* Set up auto doc to messages and chat models

* Lint

* Allow force simple mode

* Add auto doc to messages for audio and video

Fix lint

Init server structure

Restructure to server folder

Clean base and providers

Add clean method for models

Fix loggers save result

Fix dummy server error

Suppress llava warnings

Sample evaluator on llava in the wild

Update mmmu doc to messages

Update version

* Add judge server implementation with various providers and evaluation protocols

Add AsyncAzureOpenAIProvider implementation and update provider factory

Refactor sample saving in EvaluationTracker to use cleaned data and improve logging

Add llm_as_judge_eval metric to multiple tasks and integrate llm_judge API for evaluation

* Refactor MathVerseEvaluator to utilize llm_judge server for response generation and evaluation, enhancing API integration and error handling. Update MMBench_Evaluator to streamline API key handling based on environment variables.

* Refactor EvaluationTracker to directly modify sample data for improved clarity and efficiency. Update MathVerseEvaluator to streamline answer scoring by eliminating unnecessary extraction steps and enhance evaluation prompts. Remove deprecated metrics from configuration files.

* Refactor MathVistaEvaluator to integrate llm_judge server for enhanced response generation and evaluation. Streamline API configuration and error handling by removing direct API key management and utilizing a custom server configuration for requests.

* Update MathVista task configurations to replace 'gpt_eval_score' with 'llm_as_judge_eval' across multiple YAML files and adjust the result processing function accordingly. This change aligns with the integration of the llm_judge server for enhanced evaluation metrics.

* Add new OlympiadBench task configurations for mathematics and physics evaluation. Introduce 'olympiadbench_OE_MM_maths_en_COMP.yaml' and 'olympiadbench_OE_MM_physics_en_COMP.yaml' files, while removing outdated English and Chinese test configurations. Update evaluation metrics to utilize 'llm_as_judge_eval' for consistency across tasks.

* Add reasoning model utility functions and integrate into Qwen2_5_VL model. Introduced `parse_reasoning_model_answer` to clean model responses and updated answer processing in the Qwen2_5_VL class to utilize this new function, enhancing response clarity and logging.

* Update OlympiadBench task configuration to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Refactor olympiadbench_process_results to enhance response clarity. Updated the return format to include question, response, and ground truth for improved evaluation context. Simplified judge result determination logic.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for consistency with recent configuration updates and improved clarity in response generation.

* Add launcher and sglang launcher for local llm as judge

* Lint

* add new tasks MMVU and Visual Web Bench (#727)

* add mmvu task

* fix linting videomathqa

* fix mmvu to use llm judge

* add visualwebbench task

* Add Qwen2_5 chat to support doc_to_messages

* Refactor documentation and codebase to standardize naming conventions from 'lm_eval' to 'lmms_eval'. Update task configurations and evaluation metrics accordingly for consistency across the project.

* Update model guide and task configurations to replace 'max_gen_toks' with 'max_new_tokens' for consistency across YAML files and documentation. This change aligns with recent updates in the generation parameters for improved clarity in model behavior.

* Refactor evaluation logic to ensure distributed execution only occurs when multiple processes are active. Update metrics handling in OpenAI Math task to correctly track exact matches and coverage based on results.

* Fix text auto messages

* Update docs

* Add vllm chat models

* Add openai compatible

* Add sglang runtime

* Fix errors

* Fix sglang error

* Add Claude Code Action workflow configuration

* Refactor VLLM model initialization and update generation parameters across tasks. Change model version to a more generic name and adjust sampling settings to enable sampling and increase max new tokens for better performance.

* Update max_new_tokens in Huggingface model and enhance metrics handling in OpenAI math task. Remove breakpoint in VLLM model initialization.

* Allow logging task input

* Add development guidelines document outlining core rules, coding best practices, and error resolution strategies for the codebase.

* fix repr and group

* Add call tools for async openai with mcp client

* Add examples

* Support multi-node eval

* Fix grouping func

* Feature/inference throughput logging (#747)

* Add inference throughput logging to chat models

Implements TPOT (Time Per Output Token) and inference speed metrics:
- TPOT = (e2e_latency - TTFT) / (num_output_tokens - 1)
- Inference Speed = 1 / TPOT tokens/second

Modified chat models:
- openai_compatible.py: API call timing with token counting
- vllm.py: Batch-level timing with per-request metrics
- sglang.py: Timing with meta_info extraction
- huggingface.py: Batch processing with token calculation
- llava_hf.py: Single-request timing with error handling
- qwen2_5_vl.py: Batch timing implementation

Features:
- Precise timing around model.generate() calls
- TTFT estimation when not available from model
- Comprehensive logging with formatted metrics
- Batch processing support
- Error handling for robustness

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add throughput metrics documentation and update logging in chat models

* Add gen metric utils

* Revise qwen logging

* Revise llava_hf logging

* Revise hf model loggging

* Revise sglang logging

* Support vllm logging

* Add open logging

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: kcz358 <kaichenzhang358@outlook.com>

* Refactor evaluation process to utilize llm_judge API

- Updated internal evaluation scripts for D170, DC100, and DC200 tasks to replace GPT evaluation with llm_judge evaluation.
- Introduced custom prompts for binary evaluation based on model responses and ground truth.
- Modified YAML configuration files to reflect changes in the evaluation metrics and aggregation methods.
- Enhanced error handling and logging for evaluation failures.

This change aims to improve the accuracy and reliability of model evaluations across different tasks.

* Dev/olympiad bench (#762)

* Refactor vLLM model files and add OlympiadBench evaluation utilities

- Cleaned up imports and removed unused variables in `vllm.py`.
- Updated threading configuration in `simple/vllm.py` to use environment variables.
- Introduced new utility functions for processing OlympiadBench documents and results in `utils.py`, `zh_utils.py`, and `en_utils.py`.
- Added evaluation logic for OlympiadBench tasks in `olympiadbench_evals.py`.
- Created multiple YAML configuration files for various OlympiadBench tasks, including math and physics in both English and Chinese.
- Implemented aggregation functions for results processing in the OlympiadBench context.

* Implement OlympiadBench evaluation utilities and refactor math verification

- Introduced new utility functions for processing OlympiadBench documents and results in `en_utils.py` and `zh_utils.py`.
- Added a custom timeout decorator in `math_verify_utils.py` to replace the previous signal-based timeout.
- Created multiple YAML configuration files for various OlympiadBench tasks, including math and physics in both English and Chinese.
- Removed outdated files from the `olympiadbench_official` directory to streamline the codebase.
- Enhanced evaluation logic for OlympiadBench tasks in `olympiadbench_evals.py` and added aggregation functions for results processing.

* Update mathvision utility imports and modify YAML configurations for OlympiadBench

- Added error handling for importing evaluation utilities in `utils.py` to improve robustness.
- Changed `doc_to_target` from "answer" to "final_answer" in both `olympiadbench_all_boxed.yaml` and `olympiadbench_boxed.yaml` to ensure consistency in output naming.

* Update YAML configurations for AIME tasks

- Changed `do_sample` parameter to `true` in `aime24_figures_agg64.yaml` to enable sampling during generation.
- Added new configuration file `aime25_nofigures_agg64.yaml` for a new task, including detailed metrics and filtering options for evaluation.

These updates enhance the flexibility and functionality of the AIME evaluation tasks.

* Refactor internal evaluation scripts for consistency and readability

- Removed unnecessary blank lines in `d170_cn_utils.py`, `d170_en_utils.py`, `dc100_en_utils.py`, and `dc200_cn_utils.py` to improve code clarity.
- Streamlined the `evaluate_binary` API call formatting for better readability.

These changes enhance the maintainability of the evaluation scripts across different tasks.

* Update documentation for `lmms_eval` to enhance clarity and usability

- Revised command-line interface section in `commands.md` for improved readability and updated links to the main README.
- Enhanced `current_tasks.md` with clearer instructions for listing supported tasks and their question counts.
- Added comprehensive model examples in `model_guide.md` for image, video, and audio models, including implementation details and key notes.
- Expanded `README.md` to provide an overview of the framework's capabilities and updated the table of contents for better navigation.
- Included new audio model examples in `run_examples.md` to demonstrate usage.
- Introduced an audio task example in `task_guide.md` to guide users in configuring audio tasks effectively.

These updates aim to improve the overall documentation experience for users and developers working with `lmms_eval`.

* Introduce LMMS-Eval v0.4: Major update with unified message interface, multi-node distributed evaluation, and enhanced judge API

* Add agg8 task and fix data path

* Fix warning

* Remove bug report documentation from the codebase, consolidating information on identified bugs and fixes for improved clarity and maintainability.

* Add announcement for the release of `lmms-eval` v0.4.0 in README.md

* Enhance documentation for LMMS-Eval v0.4 with detailed installation instructions, system requirements, and troubleshooting tips.

* Remove outdated system requirements and installation instructions from LMMS-Eval v0.4 documentation to streamline content and improve clarity.

* Fix datetime format string in olympiadbench submission file naming

Co-authored-by: drluodian <drluodian@gmail.com>

* Fix video frame handling in protocol with range() for consistent iteration

Co-authored-by: drluodian <drluodian@gmail.com>

* Convert vLLM environment variables to integers for proper type handling

Co-authored-by: drluodian <drluodian@gmail.com>

* Fix force_simple model selection to check model availability

Co-authored-by: drluodian <drluodian@gmail.com>

* Fix format issue and add avg@8 for aime

* Allow vllm for tp

* fix parsing logic

* Fix OpenAI payload max tokens parameter to use max_new_tokens

Co-authored-by: drluodian <drluodian@gmail.com>

* Update OpenAI payload handling to include support for model version o4 and remove max_tokens parameter

* Refactor model version handling across evaluation tasks by removing hardcoded GPT model names and replacing them with environment variable support for dynamic model versioning. Update server configuration to utilize the unified judge API for improved response handling.

* batch update misused calls for eval model

* Update evaluation tasks to use environment variables for GPT model versioning, replacing hardcoded values with dynamic configuration. Remove unused YAML loading logic in multilingual LLAVA benchmark utilities.

* Enhance VLLM configuration to support distributed execution for multiple processes. Update multilingual LLAVA benchmark YAML files to include dataset names and remove deprecated config entries.

* Remove reviewer guideline and co-authored-by mention from contribution instructions in claude.md

* Add development guidelines document outlining core rules, coding best practices, and error resolution strategies for the codebase.

* Refactor score parsing logic in multiple utility files to include stripping whitespace from the score string before processing.

* Update .gitignore to include new workspace directory and modify utility files to enhance response handling by replacing Request object usage with direct server method calls for text generation across multiple evaluation tasks.

* Refactor evaluation tasks to utilize the unified judge API by replacing direct server method calls with Request object usage. Update server configuration in multiple utility files to enhance response handling and streamline evaluation processes.

* Refactor generation parameter handling in Llava_OneVision model to streamline configuration. Remove redundant default settings and ensure proper handling of sampling parameters based on the do_sample flag. Update multiple YAML task files to increase max_new_tokens and comment out temperature settings for clarity. Introduce new YAML configuration for MMMU validation reasoning task.

* Enhance score processing logic in utility functions to improve error handling and validation. Implement robust regex patterns for score extraction, ensuring all components are accounted for and scores are clamped within valid ranges. Add logging for better traceability of errors and fallback mechanisms for invalid inputs in the mia_bench evaluation process.

* Fix launch error when num proc = 1

* Refactor VLLM model parameter handling to simplify distributed execution logic. Remove redundant checks for tensor parallelism and streamline generation parameter settings by eliminating unused temperature and top_p configurations.

* Refactor VLLM message handling to prioritize image URLs before text content. Remove unused distributed executor backend parameter for cleaner execution logic.

* feat(vllm): Set default max_new_tokens to 4096, temperature to 0, and top_p to 0.95

* docs: Update lmms-eval-0.4 documentation with images and installation instructions

* docs: Update lmms-eval-0.4 documentation to include backward compatibility check

* refactor: Simplify server config instantiation in utils files

* docs: Update supported tasks count in README

* Update docs

* Fix mathverse bugs

* docs: Update images in lmms-eval-0.4.md

* docs: Remove API Benefits and Upcoming Benchmarks sections

* docs: Update image URL for Unified Message Interface

* docs: Fix typo in LMMS-Eval v0.4 documentation

Corrected "27.8/16.40" to "27.8/26.40" in the performance comparison table.
Also corrected "16.78/13.82" to "16.78/15.82" in the performance comparison table.

* fix(docs): Correct typo in LMMS-Eval v0.4 performance comparison table

* refactor(docs): Refactor LMMS-Eval v0.4 performance table for clarity

* Update docs

---------

Co-authored-by: kcz358 <kaichenzhang358@outlook.com>
Co-authored-by: Cong <101887866+pbcong@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
@kcz358 kcz358 deleted the feature/inference-throughput-logging branch December 15, 2025 09:08
Luodian added a commit that referenced this pull request Feb 28, 2026
* Update task utils and logger

* [Main Update] Doc to messages feature support and Split simple and chat mode (#692)

* Update deps

* Restructured

* Delete models

* Remove deprecated models

* Set up auto doc to messages and chat models

* Lint

* Allow force simple mode

* Add auto doc to messages for audio and video

Fix lint

Init server structure

Restructure to server folder

Clean base and providers

Add clean method for models

Fix loggers save result

Fix dummy server error

Suppress llava warnings

Sample evaluator on llava in the wild

Update mmmu doc to messages

Update version

* Add judge server implementation with various providers and evaluation protocols

Add AsyncAzureOpenAIProvider implementation and update provider factory

Refactor sample saving in EvaluationTracker to use cleaned data and improve logging

Add llm_as_judge_eval metric to multiple tasks and integrate llm_judge API for evaluation

* Refactor MathVerseEvaluator to utilize llm_judge server for response generation and evaluation, enhancing API integration and error handling. Update MMBench_Evaluator to streamline API key handling based on environment variables.

* Refactor EvaluationTracker to directly modify sample data for improved clarity and efficiency. Update MathVerseEvaluator to streamline answer scoring by eliminating unnecessary extraction steps and enhance evaluation prompts. Remove deprecated metrics from configuration files.

* Refactor MathVistaEvaluator to integrate llm_judge server for enhanced response generation and evaluation. Streamline API configuration and error handling by removing direct API key management and utilizing a custom server configuration for requests.

* Update MathVista task configurations to replace 'gpt_eval_score' with 'llm_as_judge_eval' across multiple YAML files and adjust the result processing function accordingly. This change aligns with the integration of the llm_judge server for enhanced evaluation metrics.

* Add new OlympiadBench task configurations for mathematics and physics evaluation. Introduce 'olympiadbench_OE_MM_maths_en_COMP.yaml' and 'olympiadbench_OE_MM_physics_en_COMP.yaml' files, while removing outdated English and Chinese test configurations. Update evaluation metrics to utilize 'llm_as_judge_eval' for consistency across tasks.

* Add reasoning model utility functions and integrate into Qwen2_5_VL model. Introduced `parse_reasoning_model_answer` to clean model responses and updated answer processing in the Qwen2_5_VL class to utilize this new function, enhancing response clarity and logging.

* Update OlympiadBench task configuration to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Refactor olympiadbench_process_results to enhance response clarity. Updated the return format to include question, response, and ground truth for improved evaluation context. Simplified judge result determination logic.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for consistency with recent configuration updates and improved clarity in response generation.

* Add launcher and sglang launcher for local llm as judge

* Lint

* add new tasks MMVU and Visual Web Bench (#727)

* add mmvu task

* fix linting videomathqa

* fix mmvu to use llm judge

* add visualwebbench task

* Add Qwen2_5 chat to support doc_to_messages

* Refactor documentation and codebase to standardize naming conventions from 'lm_eval' to 'lmms_eval'. Update task configurations and evaluation metrics accordingly for consistency across the project.

* Update model guide and task configurations to replace 'max_gen_toks' with 'max_new_tokens' for consistency across YAML files and documentation. This change aligns with recent updates in the generation parameters for improved clarity in model behavior.

* Update task utils and logger

* [Main Update] Doc to messages feature support and Split simple and chat mode (#692)

* Update deps

* Restructured

* Delete models

* Remove deprecated models

* Set up auto doc to messages and chat models

* Lint

* Allow force simple mode

* Add auto doc to messages for audio and video

Fix lint

Init server structure

Restructure to server folder

Clean base and providers

Add clean method for models

Fix loggers save result

Fix dummy server error

Suppress llava warnings

Sample evaluator on llava in the wild

Update mmmu doc to messages

Update version

* Add judge server implementation with various providers and evaluation protocols

Add AsyncAzureOpenAIProvider implementation and update provider factory

Refactor sample saving in EvaluationTracker to use cleaned data and improve logging

Add llm_as_judge_eval metric to multiple tasks and integrate llm_judge API for evaluation

* Refactor MathVerseEvaluator to utilize llm_judge server for response generation and evaluation, enhancing API integration and error handling. Update MMBench_Evaluator to streamline API key handling based on environment variables.

* Refactor EvaluationTracker to directly modify sample data for improved clarity and efficiency. Update MathVerseEvaluator to streamline answer scoring by eliminating unnecessary extraction steps and enhance evaluation prompts. Remove deprecated metrics from configuration files.

* Refactor MathVistaEvaluator to integrate llm_judge server for enhanced response generation and evaluation. Streamline API configuration and error handling by removing direct API key management and utilizing a custom server configuration for requests.

* Update MathVista task configurations to replace 'gpt_eval_score' with 'llm_as_judge_eval' across multiple YAML files and adjust the result processing function accordingly. This change aligns with the integration of the llm_judge server for enhanced evaluation metrics.

* Add new OlympiadBench task configurations for mathematics and physics evaluation. Introduce 'olympiadbench_OE_MM_maths_en_COMP.yaml' and 'olympiadbench_OE_MM_physics_en_COMP.yaml' files, while removing outdated English and Chinese test configurations. Update evaluation metrics to utilize 'llm_as_judge_eval' for consistency across tasks.

* Add reasoning model utility functions and integrate into Qwen2_5_VL model. Introduced `parse_reasoning_model_answer` to clean model responses and updated answer processing in the Qwen2_5_VL class to utilize this new function, enhancing response clarity and logging.

* Update OlympiadBench task configuration to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Refactor olympiadbench_process_results to enhance response clarity. Updated the return format to include question, response, and ground truth for improved evaluation context. Simplified judge result determination logic.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for consistency with recent configuration updates and improved clarity in response generation.

* Add launcher and sglang launcher for local llm as judge

* Lint

* add new tasks MMVU and Visual Web Bench (#727)

* add mmvu task

* fix linting videomathqa

* fix mmvu to use llm judge

* add visualwebbench task

* Add Qwen2_5 chat to support doc_to_messages

* Refactor documentation and codebase to standardize naming conventions from 'lm_eval' to 'lmms_eval'. Update task configurations and evaluation metrics accordingly for consistency across the project.

* Update model guide and task configurations to replace 'max_gen_toks' with 'max_new_tokens' for consistency across YAML files and documentation. This change aligns with recent updates in the generation parameters for improved clarity in model behavior.

* Refactor evaluation logic to ensure distributed execution only occurs when multiple processes are active. Update metrics handling in OpenAI Math task to correctly track exact matches and coverage based on results.

* Fix text auto messages

* Update docs

* Add vllm chat models

* Add openai compatible

* Add sglang runtime

* Fix errors

* Fix sglang error

* Add Claude Code Action workflow configuration

* Refactor VLLM model initialization and update generation parameters across tasks. Change model version to a more generic name and adjust sampling settings to enable sampling and increase max new tokens for better performance.

* Update max_new_tokens in Huggingface model and enhance metrics handling in OpenAI math task. Remove breakpoint in VLLM model initialization.

* Allow logging task input

* Add development guidelines document outlining core rules, coding best practices, and error resolution strategies for the codebase.

* fix repr and group

* Add call tools for async openai with mcp client

* Add examples

* Support multi-node eval

* Fix grouping func

* Feature/inference throughput logging (#747)

* Add inference throughput logging to chat models

Implements TPOT (Time Per Output Token) and inference speed metrics:
- TPOT = (e2e_latency - TTFT) / (num_output_tokens - 1)
- Inference Speed = 1 / TPOT tokens/second

Modified chat models:
- openai_compatible.py: API call timing with token counting
- vllm.py: Batch-level timing with per-request metrics
- sglang.py: Timing with meta_info extraction
- huggingface.py: Batch processing with token calculation
- llava_hf.py: Single-request timing with error handling
- qwen2_5_vl.py: Batch timing implementation

Features:
- Precise timing around model.generate() calls
- TTFT estimation when not available from model
- Comprehensive logging with formatted metrics
- Batch processing support
- Error handling for robustness

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add throughput metrics documentation and update logging in chat models

* Add gen metric utils

* Revise qwen logging

* Revise llava_hf logging

* Revise hf model loggging

* Revise sglang logging

* Support vllm logging

* Add open logging

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: kcz358 <kaichenzhang358@outlook.com>

* Refactor evaluation process to utilize llm_judge API

- Updated internal evaluation scripts for D170, DC100, and DC200 tasks to replace GPT evaluation with llm_judge evaluation.
- Introduced custom prompts for binary evaluation based on model responses and ground truth.
- Modified YAML configuration files to reflect changes in the evaluation metrics and aggregation methods.
- Enhanced error handling and logging for evaluation failures.

This change aims to improve the accuracy and reliability of model evaluations across different tasks.

* Dev/olympiad bench (#762)

* Refactor vLLM model files and add OlympiadBench evaluation utilities

- Cleaned up imports and removed unused variables in `vllm.py`.
- Updated threading configuration in `simple/vllm.py` to use environment variables.
- Introduced new utility functions for processing OlympiadBench documents and results in `utils.py`, `zh_utils.py`, and `en_utils.py`.
- Added evaluation logic for OlympiadBench tasks in `olympiadbench_evals.py`.
- Created multiple YAML configuration files for various OlympiadBench tasks, including math and physics in both English and Chinese.
- Implemented aggregation functions for results processing in the OlympiadBench context.

* Implement OlympiadBench evaluation utilities and refactor math verification

- Introduced new utility functions for processing OlympiadBench documents and results in `en_utils.py` and `zh_utils.py`.
- Added a custom timeout decorator in `math_verify_utils.py` to replace the previous signal-based timeout.
- Created multiple YAML configuration files for various OlympiadBench tasks, including math and physics in both English and Chinese.
- Removed outdated files from the `olympiadbench_official` directory to streamline the codebase.
- Enhanced evaluation logic for OlympiadBench tasks in `olympiadbench_evals.py` and added aggregation functions for results processing.

* Update mathvision utility imports and modify YAML configurations for OlympiadBench

- Added error handling for importing evaluation utilities in `utils.py` to improve robustness.
- Changed `doc_to_target` from "answer" to "final_answer" in both `olympiadbench_all_boxed.yaml` and `olympiadbench_boxed.yaml` to ensure consistency in output naming.

* Update YAML configurations for AIME tasks

- Changed `do_sample` parameter to `true` in `aime24_figures_agg64.yaml` to enable sampling during generation.
- Added new configuration file `aime25_nofigures_agg64.yaml` for a new task, including detailed metrics and filtering options for evaluation.

These updates enhance the flexibility and functionality of the AIME evaluation tasks.

* Refactor internal evaluation scripts for consistency and readability

- Removed unnecessary blank lines in `d170_cn_utils.py`, `d170_en_utils.py`, `dc100_en_utils.py`, and `dc200_cn_utils.py` to improve code clarity.
- Streamlined the `evaluate_binary` API call formatting for better readability.

These changes enhance the maintainability of the evaluation scripts across different tasks.

* Update documentation for `lmms_eval` to enhance clarity and usability

- Revised command-line interface section in `commands.md` for improved readability and updated links to the main README.
- Enhanced `current_tasks.md` with clearer instructions for listing supported tasks and their question counts.
- Added comprehensive model examples in `model_guide.md` for image, video, and audio models, including implementation details and key notes.
- Expanded `README.md` to provide an overview of the framework's capabilities and updated the table of contents for better navigation.
- Included new audio model examples in `run_examples.md` to demonstrate usage.
- Introduced an audio task example in `task_guide.md` to guide users in configuring audio tasks effectively.

These updates aim to improve the overall documentation experience for users and developers working with `lmms_eval`.

* Introduce LMMS-Eval v0.4: Major update with unified message interface, multi-node distributed evaluation, and enhanced judge API

* Add agg8 task and fix data path

* Fix warning

* Remove bug report documentation from the codebase, consolidating information on identified bugs and fixes for improved clarity and maintainability.

* Add announcement for the release of `lmms-eval` v0.4.0 in README.md

* Enhance documentation for LMMS-Eval v0.4 with detailed installation instructions, system requirements, and troubleshooting tips.

* Remove outdated system requirements and installation instructions from LMMS-Eval v0.4 documentation to streamline content and improve clarity.

* Fix datetime format string in olympiadbench submission file naming

Co-authored-by: drluodian <drluodian@gmail.com>

* Fix video frame handling in protocol with range() for consistent iteration

Co-authored-by: drluodian <drluodian@gmail.com>

* Convert vLLM environment variables to integers for proper type handling

Co-authored-by: drluodian <drluodian@gmail.com>

* Fix force_simple model selection to check model availability

Co-authored-by: drluodian <drluodian@gmail.com>

* Fix format issue and add avg@8 for aime

* Allow vllm for tp

* fix parsing logic

* Fix OpenAI payload max tokens parameter to use max_new_tokens

Co-authored-by: drluodian <drluodian@gmail.com>

* Update OpenAI payload handling to include support for model version o4 and remove max_tokens parameter

* Refactor model version handling across evaluation tasks by removing hardcoded GPT model names and replacing them with environment variable support for dynamic model versioning. Update server configuration to utilize the unified judge API for improved response handling.

* batch update misused calls for eval model

* Update evaluation tasks to use environment variables for GPT model versioning, replacing hardcoded values with dynamic configuration. Remove unused YAML loading logic in multilingual LLAVA benchmark utilities.

* Enhance VLLM configuration to support distributed execution for multiple processes. Update multilingual LLAVA benchmark YAML files to include dataset names and remove deprecated config entries.

* Remove reviewer guideline and co-authored-by mention from contribution instructions in claude.md

* Add development guidelines document outlining core rules, coding best practices, and error resolution strategies for the codebase.

* Refactor score parsing logic in multiple utility files to include stripping whitespace from the score string before processing.

* Update .gitignore to include new workspace directory and modify utility files to enhance response handling by replacing Request object usage with direct server method calls for text generation across multiple evaluation tasks.

* Refactor evaluation tasks to utilize the unified judge API by replacing direct server method calls with Request object usage. Update server configuration in multiple utility files to enhance response handling and streamline evaluation processes.

* Refactor generation parameter handling in Llava_OneVision model to streamline configuration. Remove redundant default settings and ensure proper handling of sampling parameters based on the do_sample flag. Update multiple YAML task files to increase max_new_tokens and comment out temperature settings for clarity. Introduce new YAML configuration for MMMU validation reasoning task.

* Enhance score processing logic in utility functions to improve error handling and validation. Implement robust regex patterns for score extraction, ensuring all components are accounted for and scores are clamped within valid ranges. Add logging for better traceability of errors and fallback mechanisms for invalid inputs in the mia_bench evaluation process.

* Fix launch error when num proc = 1

* Refactor VLLM model parameter handling to simplify distributed execution logic. Remove redundant checks for tensor parallelism and streamline generation parameter settings by eliminating unused temperature and top_p configurations.

* Refactor VLLM message handling to prioritize image URLs before text content. Remove unused distributed executor backend parameter for cleaner execution logic.

* feat(vllm): Set default max_new_tokens to 4096, temperature to 0, and top_p to 0.95

* docs: Update lmms-eval-0.4 documentation with images and installation instructions

* docs: Update lmms-eval-0.4 documentation to include backward compatibility check

* refactor: Simplify server config instantiation in utils files

* docs: Update supported tasks count in README

* Update docs

* Fix mathverse bugs

* docs: Update images in lmms-eval-0.4.md

* docs: Remove API Benefits and Upcoming Benchmarks sections

* docs: Update image URL for Unified Message Interface

* docs: Fix typo in LMMS-Eval v0.4 documentation

Corrected "27.8/16.40" to "27.8/26.40" in the performance comparison table.
Also corrected "16.78/13.82" to "16.78/15.82" in the performance comparison table.

* fix(docs): Correct typo in LMMS-Eval v0.4 performance comparison table

* refactor(docs): Refactor LMMS-Eval v0.4 performance table for clarity

* Update docs

---------

Co-authored-by: kcz358 <kaichenzhang358@outlook.com>
Co-authored-by: Cong <101887866+pbcong@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
stisiTT pushed a commit to bgoelTT/lmms-eval that referenced this pull request Mar 6, 2026
* Update task utils and logger

* [Main Update] Doc to messages feature support and Split simple and chat mode (EvolvingLMMs-Lab#692)

* Update deps

* Restructured

* Delete models

* Remove deprecated models

* Set up auto doc to messages and chat models

* Lint

* Allow force simple mode

* Add auto doc to messages for audio and video

Fix lint

Init server structure

Restructure to server folder

Clean base and providers

Add clean method for models

Fix loggers save result

Fix dummy server error

Suppress llava warnings

Sample evaluator on llava in the wild

Update mmmu doc to messages

Update version

* Add judge server implementation with various providers and evaluation protocols

Add AsyncAzureOpenAIProvider implementation and update provider factory

Refactor sample saving in EvaluationTracker to use cleaned data and improve logging

Add llm_as_judge_eval metric to multiple tasks and integrate llm_judge API for evaluation

* Refactor MathVerseEvaluator to utilize llm_judge server for response generation and evaluation, enhancing API integration and error handling. Update MMBench_Evaluator to streamline API key handling based on environment variables.

* Refactor EvaluationTracker to directly modify sample data for improved clarity and efficiency. Update MathVerseEvaluator to streamline answer scoring by eliminating unnecessary extraction steps and enhance evaluation prompts. Remove deprecated metrics from configuration files.

* Refactor MathVistaEvaluator to integrate llm_judge server for enhanced response generation and evaluation. Streamline API configuration and error handling by removing direct API key management and utilizing a custom server configuration for requests.

* Update MathVista task configurations to replace 'gpt_eval_score' with 'llm_as_judge_eval' across multiple YAML files and adjust the result processing function accordingly. This change aligns with the integration of the llm_judge server for enhanced evaluation metrics.

* Add new OlympiadBench task configurations for mathematics and physics evaluation. Introduce 'olympiadbench_OE_MM_maths_en_COMP.yaml' and 'olympiadbench_OE_MM_physics_en_COMP.yaml' files, while removing outdated English and Chinese test configurations. Update evaluation metrics to utilize 'llm_as_judge_eval' for consistency across tasks.

* Add reasoning model utility functions and integrate into Qwen2_5_VL model. Introduced `parse_reasoning_model_answer` to clean model responses and updated answer processing in the Qwen2_5_VL class to utilize this new function, enhancing response clarity and logging.

* Update OlympiadBench task configuration to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Refactor olympiadbench_process_results to enhance response clarity. Updated the return format to include question, response, and ground truth for improved evaluation context. Simplified judge result determination logic.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for consistency with recent configuration updates and improved clarity in response generation.

* Add launcher and sglang launcher for local llm as judge

* Lint

* add new tasks MMVU and Visual Web Bench (EvolvingLMMs-Lab#727)

* add mmvu task

* fix linting videomathqa

* fix mmvu to use llm judge

* add visualwebbench task

* Add Qwen2_5 chat to support doc_to_messages

* Refactor documentation and codebase to standardize naming conventions from 'lm_eval' to 'lmms_eval'. Update task configurations and evaluation metrics accordingly for consistency across the project.

* Update model guide and task configurations to replace 'max_gen_toks' with 'max_new_tokens' for consistency across YAML files and documentation. This change aligns with recent updates in the generation parameters for improved clarity in model behavior.

* Update task utils and logger

* [Main Update] Doc to messages feature support and Split simple and chat mode (EvolvingLMMs-Lab#692)

* Update deps

* Restructured

* Delete models

* Remove deprecated models

* Set up auto doc to messages and chat models

* Lint

* Allow force simple mode

* Add auto doc to messages for audio and video

Fix lint

Init server structure

Restructure to server folder

Clean base and providers

Add clean method for models

Fix loggers save result

Fix dummy server error

Suppress llava warnings

Sample evaluator on llava in the wild

Update mmmu doc to messages

Update version

* Add judge server implementation with various providers and evaluation protocols

Add AsyncAzureOpenAIProvider implementation and update provider factory

Refactor sample saving in EvaluationTracker to use cleaned data and improve logging

Add llm_as_judge_eval metric to multiple tasks and integrate llm_judge API for evaluation

* Refactor MathVerseEvaluator to utilize llm_judge server for response generation and evaluation, enhancing API integration and error handling. Update MMBench_Evaluator to streamline API key handling based on environment variables.

* Refactor EvaluationTracker to directly modify sample data for improved clarity and efficiency. Update MathVerseEvaluator to streamline answer scoring by eliminating unnecessary extraction steps and enhance evaluation prompts. Remove deprecated metrics from configuration files.

* Refactor MathVistaEvaluator to integrate llm_judge server for enhanced response generation and evaluation. Streamline API configuration and error handling by removing direct API key management and utilizing a custom server configuration for requests.

* Update MathVista task configurations to replace 'gpt_eval_score' with 'llm_as_judge_eval' across multiple YAML files and adjust the result processing function accordingly. This change aligns with the integration of the llm_judge server for enhanced evaluation metrics.

* Add new OlympiadBench task configurations for mathematics and physics evaluation. Introduce 'olympiadbench_OE_MM_maths_en_COMP.yaml' and 'olympiadbench_OE_MM_physics_en_COMP.yaml' files, while removing outdated English and Chinese test configurations. Update evaluation metrics to utilize 'llm_as_judge_eval' for consistency across tasks.

* Add reasoning model utility functions and integrate into Qwen2_5_VL model. Introduced `parse_reasoning_model_answer` to clean model responses and updated answer processing in the Qwen2_5_VL class to utilize this new function, enhancing response clarity and logging.

* Update OlympiadBench task configuration to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Refactor olympiadbench_process_results to enhance response clarity. Updated the return format to include question, response, and ground truth for improved evaluation context. Simplified judge result determination logic.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for improved clarity in response generation.

* Update olympiadbench_OE_MM_physics_en_COMP.yaml to change 'doc_to_target' from 'answer' to 'final_answer' for consistency with recent configuration updates and improved clarity in response generation.

* Add launcher and sglang launcher for local llm as judge

* Lint

* add new tasks MMVU and Visual Web Bench (EvolvingLMMs-Lab#727)

* add mmvu task

* fix linting videomathqa

* fix mmvu to use llm judge

* add visualwebbench task

* Add Qwen2_5 chat to support doc_to_messages

* Refactor documentation and codebase to standardize naming conventions from 'lm_eval' to 'lmms_eval'. Update task configurations and evaluation metrics accordingly for consistency across the project.

* Update model guide and task configurations to replace 'max_gen_toks' with 'max_new_tokens' for consistency across YAML files and documentation. This change aligns with recent updates in the generation parameters for improved clarity in model behavior.

* Refactor evaluation logic to ensure distributed execution only occurs when multiple processes are active. Update metrics handling in OpenAI Math task to correctly track exact matches and coverage based on results.

* Fix text auto messages

* Update docs

* Add vllm chat models

* Add openai compatible

* Add sglang runtime

* Fix errors

* Fix sglang error

* Add model Code Action workflow configuration

* Refactor VLLM model initialization and update generation parameters across tasks. Change model version to a more generic name and adjust sampling settings to enable sampling and increase max new tokens for better performance.

* Update max_new_tokens in Huggingface model and enhance metrics handling in OpenAI math task. Remove breakpoint in VLLM model initialization.

* Allow logging task input

* Add development guidelines document outlining core rules, coding best practices, and error resolution strategies for the codebase.

* fix repr and group

* Add call tools for async openai with mcp client

* Add examples

* Support multi-node eval

* Fix grouping func

* Feature/inference throughput logging (EvolvingLMMs-Lab#747)

* Add inference throughput logging to chat models

Implements TPOT (Time Per Output Token) and inference speed metrics:
- TPOT = (e2e_latency - TTFT) / (num_output_tokens - 1)
- Inference Speed = 1 / TPOT tokens/second

Modified chat models:
- openai_compatible.py: API call timing with token counting
- vllm.py: Batch-level timing with per-request metrics
- sglang.py: Timing with meta_info extraction
- huggingface.py: Batch processing with token calculation
- llava_hf.py: Single-request timing with error handling
- qwen2_5_vl.py: Batch timing implementation

Features:
- Precise timing around model.generate() calls
- TTFT estimation when not available from model
- Comprehensive logging with formatted metrics
- Batch processing support
- Error handling for robustness

🤖 Generated with [model Code](https://model.ai/code)

Co-Authored-By: model <noreply@API.com>

* Add throughput metrics documentation and update logging in chat models

* Add gen metric utils

* Revise qwen logging

* Revise llava_hf logging

* Revise hf model loggging

* Revise sglang logging

* Support vllm logging

* Add open logging

---------

Co-authored-by: model <noreply@API.com>
Co-authored-by: kcz358 <kaichenzhang358@outlook.com>

* Refactor evaluation process to utilize llm_judge API

- Updated internal evaluation scripts for D170, DC100, and DC200 tasks to replace GPT evaluation with llm_judge evaluation.
- Introduced custom prompts for binary evaluation based on model responses and ground truth.
- Modified YAML configuration files to reflect changes in the evaluation metrics and aggregation methods.
- Enhanced error handling and logging for evaluation failures.

This change aims to improve the accuracy and reliability of model evaluations across different tasks.

* Dev/olympiad bench (EvolvingLMMs-Lab#762)

* Refactor vLLM model files and add OlympiadBench evaluation utilities

- Cleaned up imports and removed unused variables in `vllm.py`.
- Updated threading configuration in `simple/vllm.py` to use environment variables.
- Introduced new utility functions for processing OlympiadBench documents and results in `utils.py`, `zh_utils.py`, and `en_utils.py`.
- Added evaluation logic for OlympiadBench tasks in `olympiadbench_evals.py`.
- Created multiple YAML configuration files for various OlympiadBench tasks, including math and physics in both English and Chinese.
- Implemented aggregation functions for results processing in the OlympiadBench context.

* Implement OlympiadBench evaluation utilities and refactor math verification

- Introduced new utility functions for processing OlympiadBench documents and results in `en_utils.py` and `zh_utils.py`.
- Added a custom timeout decorator in `math_verify_utils.py` to replace the previous signal-based timeout.
- Created multiple YAML configuration files for various OlympiadBench tasks, including math and physics in both English and Chinese.
- Removed outdated files from the `olympiadbench_official` directory to streamline the codebase.
- Enhanced evaluation logic for OlympiadBench tasks in `olympiadbench_evals.py` and added aggregation functions for results processing.

* Update mathvision utility imports and modify YAML configurations for OlympiadBench

- Added error handling for importing evaluation utilities in `utils.py` to improve robustness.
- Changed `doc_to_target` from "answer" to "final_answer" in both `olympiadbench_all_boxed.yaml` and `olympiadbench_boxed.yaml` to ensure consistency in output naming.

* Update YAML configurations for AIME tasks

- Changed `do_sample` parameter to `true` in `aime24_figures_agg64.yaml` to enable sampling during generation.
- Added new configuration file `aime25_nofigures_agg64.yaml` for a new task, including detailed metrics and filtering options for evaluation.

These updates enhance the flexibility and functionality of the AIME evaluation tasks.

* Refactor internal evaluation scripts for consistency and readability

- Removed unnecessary blank lines in `d170_cn_utils.py`, `d170_en_utils.py`, `dc100_en_utils.py`, and `dc200_cn_utils.py` to improve code clarity.
- Streamlined the `evaluate_binary` API call formatting for better readability.

These changes enhance the maintainability of the evaluation scripts across different tasks.

* Update documentation for `lmms_eval` to enhance clarity and usability

- Revised command-line interface section in `commands.md` for improved readability and updated links to the main README.
- Enhanced `current_tasks.md` with clearer instructions for listing supported tasks and their question counts.
- Added comprehensive model examples in `model_guide.md` for image, video, and audio models, including implementation details and key notes.
- Expanded `README.md` to provide an overview of the framework's capabilities and updated the table of contents for better navigation.
- Included new audio model examples in `run_examples.md` to demonstrate usage.
- Introduced an audio task example in `task_guide.md` to guide users in configuring audio tasks effectively.

These updates aim to improve the overall documentation experience for users and developers working with `lmms_eval`.

* Introduce LMMS-Eval v0.4: Major update with unified message interface, multi-node distributed evaluation, and enhanced judge API

* Add agg8 task and fix data path

* Fix warning

* Remove bug report documentation from the codebase, consolidating information on identified bugs and fixes for improved clarity and maintainability.

* Add announcement for the release of `lmms-eval` v0.4.0 in README.md

* Enhance documentation for LMMS-Eval v0.4 with detailed installation instructions, system requirements, and troubleshooting tips.

* Remove outdated system requirements and installation instructions from LMMS-Eval v0.4 documentation to streamline content and improve clarity.

* Fix datetime format string in olympiadbench submission file naming

Co-authored-by: drluodian <drluodian@gmail.com>

* Fix video frame handling in protocol with range() for consistent iteration

Co-authored-by: drluodian <drluodian@gmail.com>

* Convert vLLM environment variables to integers for proper type handling

Co-authored-by: drluodian <drluodian@gmail.com>

* Fix force_simple model selection to check model availability

Co-authored-by: drluodian <drluodian@gmail.com>

* Fix format issue and add avg@8 for aime

* Allow vllm for tp

* fix parsing logic

* Fix OpenAI payload max tokens parameter to use max_new_tokens

Co-authored-by: drluodian <drluodian@gmail.com>

* Update OpenAI payload handling to include support for model version o4 and remove max_tokens parameter

* Refactor model version handling across evaluation tasks by removing hardcoded GPT model names and replacing them with environment variable support for dynamic model versioning. Update server configuration to utilize the unified judge API for improved response handling.

* batch update misused calls for eval model

* Update evaluation tasks to use environment variables for GPT model versioning, replacing hardcoded values with dynamic configuration. Remove unused YAML loading logic in multilingual LLAVA benchmark utilities.

* Enhance VLLM configuration to support distributed execution for multiple processes. Update multilingual LLAVA benchmark YAML files to include dataset names and remove deprecated config entries.

* Remove reviewer guideline and co-authored-by mention from contribution instructions in model.md

* Add development guidelines document outlining core rules, coding best practices, and error resolution strategies for the codebase.

* Refactor score parsing logic in multiple utility files to include stripping whitespace from the score string before processing.

* Update .gitignore to include new workspace directory and modify utility files to enhance response handling by replacing Request object usage with direct server method calls for text generation across multiple evaluation tasks.

* Refactor evaluation tasks to utilize the unified judge API by replacing direct server method calls with Request object usage. Update server configuration in multiple utility files to enhance response handling and streamline evaluation processes.

* Refactor generation parameter handling in Llava_OneVision model to streamline configuration. Remove redundant default settings and ensure proper handling of sampling parameters based on the do_sample flag. Update multiple YAML task files to increase max_new_tokens and comment out temperature settings for clarity. Introduce new YAML configuration for MMMU validation reasoning task.

* Enhance score processing logic in utility functions to improve error handling and validation. Implement robust regex patterns for score extraction, ensuring all components are accounted for and scores are clamped within valid ranges. Add logging for better traceability of errors and fallback mechanisms for invalid inputs in the mia_bench evaluation process.

* Fix launch error when num proc = 1

* Refactor VLLM model parameter handling to simplify distributed execution logic. Remove redundant checks for tensor parallelism and streamline generation parameter settings by eliminating unused temperature and top_p configurations.

* Refactor VLLM message handling to prioritize image URLs before text content. Remove unused distributed executor backend parameter for cleaner execution logic.

* feat(vllm): Set default max_new_tokens to 4096, temperature to 0, and top_p to 0.95

* docs: Update lmms-eval-0.4 documentation with images and installation instructions

* docs: Update lmms-eval-0.4 documentation to include backward compatibility check

* refactor: Simplify server config instantiation in utils files

* docs: Update supported tasks count in README

* Update docs

* Fix mathverse bugs

* docs: Update images in lmms-eval-0.4.md

* docs: Remove API Benefits and Upcoming Benchmarks sections

* docs: Update image URL for Unified Message Interface

* docs: Fix typo in LMMS-Eval v0.4 documentation

Corrected "27.8/16.40" to "27.8/26.40" in the performance comparison table.
Also corrected "16.78/13.82" to "16.78/15.82" in the performance comparison table.

* fix(docs): Correct typo in LMMS-Eval v0.4 performance comparison table

* refactor(docs): Refactor LMMS-Eval v0.4 performance table for clarity

* Update docs

---------

Co-authored-by: kcz358 <kaichenzhang358@outlook.com>
Co-authored-by: Cong <101887866+pbcong@users.noreply.github.com>
Co-authored-by: model <noreply@API.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants