# yam-cli **Repository Path**: markhoo/yam-cli ## Basic Information - **Project Name**: yam-cli - **Description**: No description available - **Primary Language**: Rust - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-02-08 - **Last Updated**: 2025-02-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # yam YAM - Yet Another Model Manager #### 安装教程 下载发行版本解压后配置路径到系统环境变量。 #### 使用说明 ```bash $ yam YAM - Yet Another Model Manager Usage: yam Commands: pull Pull a model from repository run Run a model rm Remove a model list List downloaded models ps List running models show Show model details help Print this message or the help of the given subcommand(s) Options: -h, --help Print help -V, --version Print version ``` #### 项目目录结构 ```text yam/ ├── Cargo.toml ├── Cargo.lock ├── src/ │ ├── main.rs # 主程序入口 │ ├── lib.rs # 库定义 │ ├── config.rs # 配置管理 │ ├── cli.rs # 命令行解析 │ ├── error.rs # 错误处理 │ ├── download.rs # 模型下载 │ ├── models/ # 模型管理 │ │ ├── mod.rs │ │ ├── version.rs │ │ └── manifest.rs │ ├── inference/ # 推理模块 │ │ ├── mod.rs │ │ ├── cpu.rs │ │ ├── cuda.rs # #[cfg(feature = "cuda")] │ │ └── metal.rs # #[cfg(feature = "metal")] │ ├── api/ # REST API │ │ ├── mod.rs │ │ ├── routes.rs │ │ └── handlers.rs │ ├── security/ # 安全模块 │ │ ├── mod.rs │ │ ├── signature.rs │ │ └── sandbox.rs │ ├── plugins/ # 插件系统 │ │ ├── mod.rs │ │ └── loader.rs │ └── distributed/ # 分布式推理 │ ├── mod.rs # #[cfg(feature = "distributed")] │ ├── cluster.rs │ └── protocol.rs ├── tests/ # 集成测试 └── resources/ # 配置文件模板 └── config.yaml ``` #### 系统架构图 ```text +-----------------------+ | User CLI | +-----------------------+ | v +-----------------------+ | Command Router | +-----------------------+ | v +-----------------------+ | Core Services | | +-----------------+ | | | Model Manager | | | +-----------------+ | | +-----------------+ | | | Inference Engine | | | +-----------------+ | | +-----------------+ | | | Security Layer | | | +-----------------+ | +-----------------------+ | v +-----------------------+ | Hardware Abstraction| | +-----------------+ | | | CPU Acceleration | | | +-----------------+ | | +-----------------+ | | | CUDA Backend | | #[cfg(feature = "cuda")] | +-----------------+ | | +-----------------+ | | | Metal Backend | | #[cfg(feature = "metal")] | +-----------------+ | +-----------------------+ | v +-----------------------+ | Plugin System | | +-----------------+ | | | Finetune Plugins | | | +-----------------+ | | +-----------------+ | | | Convert Plugins | | | +-----------------+ | +-----------------------+ ``` #### 系统关键特性说明 1. 模块化架构: - 核心服务与插件系统解耦 - 硬件加速后端可插拔 - 功能模块通过特性开关控制 2. 安全设计: - 启动时安全初始化 - 模型签名验证 - 沙箱执行环境 - 传输层加密(HTTPS) 3. 高性能实现: - 异步I/O架构 - 零拷贝数据传输 - 自适应批处理 - 多级缓存系统 4. 扩展能力: - 插件系统支持动态加载 - 分布式推理框架 - 多硬件后端支持 - REST API接口 5. 生产级特性: - 完善的日志系统 - Prometheus监控指标 - 自动更新机制 - 配置热加载