Code Monkey home page Code Monkey logo

Comments (5)

cgisky1980 avatar cgisky1980 commented on June 15, 2024 1

好 我回来了

from ai00_server.

cryscan avatar cryscan commented on June 15, 2024 1

Config.toml已移动至assets目录下。注意,启动项--model已经改为--config

from ai00_server.

cgisky1980 avatar cgisky1980 commented on June 15, 2024

@cryscan 前端目前需要的接口汇总

已经完成:

✔ Fix /models 接口,返回更多信息,目前这个接口不正常返回信息。

  1. 模型的运行状态:是否加载成功
  2. /load 提交的参数
  3. 模型型号等信息

❤❤❤💥💥💥 已完成!

✔ Fix 所有API 添加 /api/ 前缀

  1. 用以区分 网页访问 和 API 的区别,避免http路径的冲突
  2. 网页访问统一 '/' 和 ‘/plugin/xxxx’ 路径下
  3. API访问,统一在 '/api/xxxxx' 路径下
  4. 修改所有老的api 路径

❤❤❤💥💥💥 已完成!

✔ Add 多个 zip 文件,http访问需求

  1. 默认 "/" 请求,读取 assets/www目录 下的 index.zip 文件
  2. www.zip 移入 assets/www目录,改名index.zip ,
  3. "/plugin/[name]" 请求 自动读取 assets/www目录 下的 [name].zip 文件
  4. 拒绝 api.zip 命名的 文件,避免和api 冲突

❤❤❤💥💥💥 已完成!

这里 比如http://127.0.0.1:65530/apps/chat/base-channel 中 apps这样的一级目录,只有三种情况,

  1. /api 指到各个api的请求
  2. /plugin /plugin/docs/* 读取 assets/www/docs.zip 里面文件 没有的话 输出 docs.zip 的 index.html
    3 其他 全都读取 assets/www/index.zip 里面文件 没有的话 输出 index.html

✔ Add /api/listfiles 新增接口需求

  1. Post 一个 assets 下的目录名,返回目录下的文件列表 (可指定扩展名,默认返回所有文件)
  2. 返回 文件名、文件大小、文件的MD5或者SHA值
  3. Config.toml 移入 assets/configs 目录

❤❤❤💥💥💥 已完成!

✔ Add /api/unzip 新增接口需求

  1. Post 一个zip 或者 rar 文件地址、需要解压到的目录地址 (绝对目录or相对目录)、需要保存的目录名
  2. 如有相同文件夹名,先删除文件夹,再解压

❤❤❤💥💥💥 已完成!

✔ Add /api/GPUs 接口需求 或者 /adapters

  1. 返回支持VULKAN的GPU型号 和对应的序号
  2. /load 接口 应该加入 adapter 参数

❤❤❤💥💥💥 已完成!

☢ Add /api/unload 接口需求

  1. 卸载已加载的模型

❤❤❤💥💥💥 已完成!

☢ Add /api/saveconfig 新增接口需求

  1. Post savename参数可指定保存的文件名(只有文件名,扩展名可固定为toml)
  2. toml参数指定文件内容,根据KV,保存为toml文件
  3. 文件只保存在 assets/configs 目录

❤❤❤💥💥💥 已完成!

☢ Add /api/loadconfig 新增接口需求

  1. Post 参数指定要读取的文件名(只有文件名,扩展名可固定为toml)
  2. 文件只读取在 assets/configs 目录 以及子目录中
  3. 返回jason格式

❤❤❤💥💥💥 已完成!

尚未完全完成

废弃 /api/state 新增接口需求 改由前端实现

  1. CPU、GPU、内存占用、显存占用、最大内存、最大显存 ……等等信息
  2. 模型相关信息是否运行、模型型号信息)
  3. SSE方式每0.5秒推送一次

☢ Add /api/ban 接口需求

  1. 进行 N次 100tokens 生成测试 取平均值
  2. 可并行测试

☢ /api/models/load 接口修改

原来的参数结构

pub struct ReloadRequest {
    /// Path to the model.
    pub model_path: PathBuf,
    /// List of LoRA blended on the model.
    pub lora: Vec<config::Lora>,
    /// Specify layers that needs to be quantized.
    pub quant: usize,
    /// Whether to use alternative GEMM kernel to speed-up long prompts.
    pub turbo: bool,
    /// Maximum tokens to be processed in parallel at once.
    pub token_chunk_size: usize,
    /// The chunk size for each split of the head matrix.
    pub head_chunk_size: usize,
    /// Maximum number of batches that are active at once.
    pub max_runtime_batch: usize,
    /// Number of states that are cached on GPU.
    pub max_batch: usize,
    /// the (reversed) number of layer at which the output is as embedding.
    pub embed_layer: usize,
    /// Path to the tokenizer.
    pub tokenizer_path: PathBuf,
    /// Adapter selection.
    pub adapter: AdapterOption,
}

增加一个 quant_type : FP32 FP16 INT8 NF4 去除 turbo(据说 turbo = FP16 ?)

from ai00_server.

cgisky1980 avatar cgisky1980 commented on June 15, 2024

@cryscan 更新了一下 需求描述 和进度, 新增了 一两个API接口需求

from ai00_server.

cryscan avatar cryscan commented on June 15, 2024
  1. 界面截图功能无法使用。
  2. Prompt最好改成:
User: Hi.

Assistant: Hello! I'm your AI assistant. I'm here to help you with various tasks, such as answering questions, brainstorming ideas, drafting emails, writing code, providing advice, and much more.

User: What's the date today?

Assistant: It's ...
  1. 请不要取随机生成的名字。十分违和而且没有用。
  2. 设置里面的max_runtime_batchmax_batch失效。

from ai00_server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.