[fix] ujson 在新版 Python 下编译失败阻塞依赖安装,移除该未使用依赖并补充 pyproject.toml

pull/873/head
momoyeyu 2026-09-26 09:48:00 +08:00
parent f659b55761
commit 62cb5dbc5c
3 changed files with 46 additions and 2 deletions

View File

@ -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)
</details>
@ -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 中的依赖)
```
## Ⅰ 🚀 模型推理

44
pyproject.toml Normal file
View File

@ -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

View File

@ -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