InternVL icon indicating copy to clipboard operation
InternVL copied to clipboard

[Feature] Optimize Requirements File

Open PREPONDERANCE opened this issue 3 months ago • 1 comments

Motivation

Currently, all requirements for InternVL codebase rely on standalone requirements.txt files, in which, the version information is mostly incomplete. I would strongly suggest completing the version information for easier local development.

Related resources

Here, I've provided an example requirements.txt file for InternVL Chat (flash-attn excluded).

Example requirements.txt file

pip install -r requirements.txt
pip install flash-attn==2.3.6 --no-build-isolation

If you encounter any errors when installing flash-attn, please download the officially released whl file. Install it with pip install flash_attn-2.3.6+cu122torch2.1cxx11abiFALSE-cp39-cp39-linux_x86_64.whl

Additional context

Additionally, I would suggest using more advanced environment control tools. I've successfully integrated InternVL Chat with uv.

Example pyproject.toml file:

[project]
dependencies = [
    "accelerate==0.27.2",
    "aiofiles>=24.1.0",
    "bitsandbytes==0.42.0",
    "datasets>=2.16.1",
    "decord==0.6.0; sys_platform != 'darwin'",
    "deepspeed==0.13.5",
    "dotenv>=0.9.9",
    "einops-exts==0.0.4",
    "huggingface-hub>=0.34.0",
    "imageio==2.37.0",
    "numpy==1.26.4",
    "opencv-python>=4.11.0.86",
    "orjson>=3.11.1",
    "peft==0.10.0",
    "pyarrow==10.0.1",
    "pycocoevalcap==1.2",
    "pyyaml==6.0.2",
    "scikit-learn==1.6.1",
    "scipy==1.13.1",
    "sentencepiece==0.1.99",
    "setuptools>=80.9.0",
    "shortuuid==1.0.13",
    "tensorboardx==2.6.4",
    "termcolor==3.1.0",
    "timm==0.9.12",
    "tokenizers==0.15.1",
    "torch==2.1.0",
    "tqdm>=4.67.1",
    "transformers==4.37.2",
    "trl>=0.10.1",
    "yacs==0.1.8",
]
name = "xxx"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.9"


[tool.uv]
index-url = "https://mirrors.aliyun.com/pypi/simple/"

PREPONDERANCE avatar Sep 16 '25 13:09 PREPONDERANCE

thanks, but not work good

whcjb avatar Sep 22 '25 02:09 whcjb