diff --git a/README.md b/README.md index dadc82c..bcce6a3 100644 --- a/README.md +++ b/README.md @@ -219,7 +219,7 @@ minimind2系列旧模型均经过权重映射+(微调训练)QKVO线性层校 * GPU: NVIDIA GeForce RTX 3090 (24GB) * 8 * Ubuntu==20.04 * CUDA==12.2 -* Python==3.10.16 +* Python==3.10.16(实测 3.10 ~ 3.12 均可正常使用) * [requirements.txt](./requirements.txt) @@ -230,6 +230,7 @@ minimind2系列旧模型均经过权重映射+(微调训练)QKVO线性层校 # 克隆仓库、安装依赖 git clone --depth 1 https://github.com/jingyaogong/minimind cd minimind && pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple +# 或使用 uv:uv sync(会自动创建 .venv 并安装 pyproject.toml 中的依赖) ``` ## Ⅰ 🚀 模型推理 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d699007 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,44 @@ +[project] +name = "minimind" +version = "3.0.0" +description = "MiniMind: 从0训练极小参数量的中文大语言模型" +readme = "README.md" +requires-python = ">=3.10,<3.13" +# 与 requirements.txt 保持一致;torch 默认走 PyPI(Linux 为 CUDA 版,macOS 为 MPS 版), +# 如需指定 CUDA 版本可改用 https://download.pytorch.org/whl/ 对应索引 +dependencies = [ + "datasets==3.6.0", + "datasketch==1.6.4", + "einops==0.8.1", + "fastapi==0.120.1", + "flask==3.0.3", + "flask-cors==4.0.0", + "jieba==0.42.1", + "jinja2==3.1.2", + "jsonlines==4.0.0", + "marshmallow==3.22.0", + "modelscope==1.37.0", + "ngrok==1.4.0", + "nltk==3.8", + "numpy==1.26.4", + "openai==1.59.6", + "protobuf==6.33.5", + "psutil==5.9.8", + "pydantic==2.11.5", + "rich==13.7.1", + "scikit-learn==1.5.1", + "sentence-transformers==2.3.1", + "sentencepiece==0.2.0", + "simhash==2.1.2", + "streamlit==1.50.0", + "swanlab==0.9.8", + "tiktoken==0.10.0", + "torch==2.6.0", + "transformers==4.57.6", + "trl==0.13.0", + "uvicorn==0.38.0", + "wandb==0.22.3", +] + +[tool.uv] +package = false diff --git a/requirements.txt b/requirements.txt index 96dc73c..30194dd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,6 @@ transformers==4.57.6 jinja2==3.1.2 jsonlines==4.0.0 trl==0.13.0 -ujson==5.1.0 wandb==0.22.3 streamlit==1.50.0 einops==0.8.1