From 62cb5dbc5ca748f0751a12deb86c4d4873d7127b Mon Sep 17 00:00:00 2001 From: momoyeyu Date: Sat, 26 Sep 2026 09:48:00 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20ujson=20=E5=9C=A8=E6=96=B0=E7=89=88=20P?= =?UTF-8?q?ython=20=E4=B8=8B=E7=BC=96=E8=AF=91=E5=A4=B1=E8=B4=A5=E9=98=BB?= =?UTF-8?q?=E5=A1=9E=E4=BE=9D=E8=B5=96=E5=AE=89=E8=A3=85=EF=BC=8C=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E8=AF=A5=E6=9C=AA=E4=BD=BF=E7=94=A8=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E5=B9=B6=E8=A1=A5=E5=85=85=20pyproject.toml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- pyproject.toml | 44 ++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 1 - 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 pyproject.toml 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