Skip to content

Conversation

@Luodian
Copy link
Contributor

@Luodian Luodian commented Apr 18, 2025

  • Replaced AutoModelForCausalLM and AutoProcessor with AriaForConditionalGeneration and AriaProcessor in the Aria model.
  • Updated the pretrained model string in LlamaVision to "meta-llama/Llama-3.2-11B-Vision-Instruct".
  • Enhanced OpenAICompatible to support AzureOpenAI and modified API key handling for better flexibility.
  • Adjusted timeout parameter and refined token handling in OpenAICompatible for improved functionality.

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!

Luodian added 3 commits April 17, 2025 18:03
…dling

- Added `system_prompt`, `interleave_visuals`, and `max_length` parameters to Qwen2_VL class.
- Simplified device assignment logic for single process scenarios.
- Improved visual processing by refining how visuals are handled and ensuring proper mapping to contexts.
- Enhanced message construction to support interleaving of visuals and text based on placeholders.
- Set default generation parameters and refined handling of generated outputs to ensure proper trimming and formatting.
… consistency

- Updated string formatting to use double quotes for consistency.
- Enhanced the `VisualPuzzles_doc_to_text` and `parse_response` functions for better clarity and structure.
- Simplified conditional checks and improved whitespace handling in response parsing.
- Ensured consistent handling of options and answers throughout the utility functions.
…Compatible

- Replaced AutoModelForCausalLM and AutoProcessor with AriaForConditionalGeneration and AriaProcessor in the Aria model.
- Updated the pretrained model string in LlamaVision to "meta-llama/Llama-3.2-11B-Vision-Instruct".
- Enhanced OpenAICompatible to support AzureOpenAI and modified API key handling for better flexibility.
- Adjusted timeout parameter and refined token handling in OpenAICompatible for improved functionality.
@Luodian Luodian changed the title Fix/models [Fix] Aria and LLama Vision and OpenAI compatible models Apr 18, 2025
@Luodian Luodian requested a review from kcz358 April 18, 2025 14:23
@Luodian
Copy link
Contributor Author

Luodian commented Apr 18, 2025

We should close the last PR then could merge this since it's developed based on that.

#639

Copy link
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.

Most of the codes look fine to me as this is the only way to hardcode under current logic. I will merge this PR.

A small notice for others:

We plan to rfc the doc to text these things in the future with messages format so these hardcoded models will gradually being deprecated. Please stay tuned for our update

@kcz358 kcz358 merged commit b68fa0b into main Apr 19, 2025
1 of 2 checks passed
@kcz358 kcz358 deleted the fix/models branch April 19, 2025 05:12
dadwadw233 pushed a commit to dadwadw233/lmms-eval that referenced this pull request Apr 28, 2025
…s-Lab#641)

* Enhance Qwen model with additional parameters and improved visual handling

- Added `system_prompt`, `interleave_visuals`, and `max_length` parameters to Qwen2_VL class.
- Simplified device assignment logic for single process scenarios.
- Improved visual processing by refining how visuals are handled and ensuring proper mapping to contexts.
- Enhanced message construction to support interleaving of visuals and text based on placeholders.
- Set default generation parameters and refined handling of generated outputs to ensure proper trimming and formatting.

* Refactor VisualPuzzles utility functions for improved readability and consistency

- Updated string formatting to use double quotes for consistency.
- Enhanced the `VisualPuzzles_doc_to_text` and `parse_response` functions for better clarity and structure.
- Simplified conditional checks and improved whitespace handling in response parsing.
- Ensured consistent handling of options and answers throughout the utility functions.

* Update model imports and parameters for Aria, LlamaVision, and OpenAICompatible

- Replaced AutoModelForCausalLM and AutoProcessor with AriaForConditionalGeneration and AriaProcessor in the Aria model.
- Updated the pretrained model string in LlamaVision to "meta-llama/Llama-3.2-11B-Vision-Instruct".
- Enhanced OpenAICompatible to support AzureOpenAI and modified API key handling for better flexibility.
- Adjusted timeout parameter and refined token handling in OpenAICompatible for improved functionality.
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.

3 participants