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
* Update API usage and add environment configuration
- Adjust API client initialization for OpenAI and Azure.
- Modify image encoding to handle size limits and maintain aspect ratio.
- Add new `OpenAICompatible` model class.
- Introduce retry mechanism for API requests with configurable retries.
- Update `.gitignore` to exclude `.env` and `scripts/`.
.gitignore:
- Exclude `.env` file for security.
- Ensure no scripts directory is tracked.
lmms_eval/models/gpt4v.py:
- Refactor API client initialization to use new OpenAI and Azure clients.
- Update image encoding to handle size limits with resizing logic.
- Adjust retry logic for API calls, reducing sleep time.
lmms_eval/models/openai_compatible.py:
- Create new `OpenAICompatible` model class with similar structure.
- Implement encoding functions for images and videos.
- Integrate environment variable loading and persistent response caching.
miscs/model_dryruns/openai_compatible.sh:
- Add sample script for running the new model.
* Improve code readability and organization
- Remove unused import for deepcopy in `openai_compatible.py`.
- Add a blank line for better separation of code sections.
- Adjust comment formatting for `max_size_in_mb` for consistency.
- Ensure consistent spacing around comments.
File: `lmms_eval/models/openai_compatible.py`
- Removed `deepcopy` import: cleaned up unnecessary code.
- Added blank line after `load_dotenv`: improved readability.
- Reformatted comment on `max_size_in_mb`: enhanced clarity.
- Removed extra blank line before `Accelerator`: tightened spacing.
* Fix init
---------
Co-authored-by: kcz358 <[email protected]>
# assert self.batch_size_per_gpu == 1, "Llava currently does not support batched generation. See https://github.com/haotian-liu/LLaVA/issues/754. HF Llava also has this issue."
0 commit comments