# modscope **Repository Path**: huangkai19/modscope ## Basic Information - **Project Name**: modscope - **Description**: 魔搭社区研究 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-09 - **Last Updated**: 2025-07-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # modscope #### 介绍 魔搭社区研究 #### 软件架构 软件架构说明 #### 安装教程 ##### 虚拟开发环境 ```bash # 创建虚拟环境 python -m venv qwen_env # 激活虚拟环境 source qwen_env/bin/activate # Linux / macOS qwen_env\Scripts\activate.bat # Windows ``` ##### 常用库安装 ```bash pip install modelscope torch accelerate sentencepiece protobuf addict tqdm requests datasets pillow simplejson sortedcontainers transformers ms-swift ``` ##### pip升级 ```bash python.exe -m pip install --upgrade pip ``` #### 使用说明 ##### 涉及到的库 | 包名 | 用途说明 | 使用场景示例 | | ---------------- | ------------------------------------------------------------ | -------------------- | | modelscope | 阿里云 ModelScope 平台 SDK,用于模型下载、加载和推理 | 加载 Qwen3-0.6B 模型 | | torch | PyTorch 深度学习框架,提供张量计算和自动求导功能 | 模型推理、训练 | | accelerate | HuggingFace 提供的库,支持多设备(CPU/GPU)推理与分布式训练 | 多设备推理调度 | | sentencepiece | Google 开发的分词工具库,用于文本预处理 | 分词、tokenize 文本 | | protobuf | Google Protocol Buffers 库,用于结构化数据序列化 | 模型配置文件解析 | | addict | Python 字典增强库,提供更灵活的字典操作 | 配置管理、动态字典 | | tqdm | 进度条库,用于在终端显示循环或下载进度 | 显示模型加载进度 | | requests | HTTP 请求库,用于网络请求 | 下载模型、API 调用 | | datasets | HuggingFace 提供的数据集加载与处理库 | 数据集加载与预处理 | | pillow | Python 图像处理库,提供图像读取、处理和保存功能 | 图像输入输出处理 | | simplejson | 增强版 JSON 解析库,提供更快的 JSON 编解码能力 | 配置文件读写 | | sortedcontainers | 提供有序容器类型(如 SortedList、SortedDict),提升集合操作效率 | 高效数据结构存储 | | transformers | HuggingFace 提供的模型接口库,支持多种预训练语言模型 | 模型加载与推理 | | ms-swift | ModelScope 推出的轻量级大模型训练/推理工具库 | LLM 推理支持 | #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)