/ Модель

Характеристики

Контекст
8 192 токена
Параметры
11,4 млрд
Размер весов
15,4 ГБ
Лицензия
CC BY-NC-ND 4.0
Архитектура
qwen · dense
Опубликована
17 ноя 2023

kagentlms_qwen_7b_mat

Генерация текстаТекст → текст3 профессии

Дообученная модель Qwen для планирования, рефлексии и использования инструментов в агентных системах.

43скачиваний за 30 дней14лайковвеса обновлены9 янв 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

kwaikeg/kagentlms_qwen_7b_mat — языковая модель серии KAgentLMs от KwaiKEG (Kuaishou Technology), дообученная для выполнения агентных задач. Она предназначена для планирования, рефлексии и использования инструментов в диалоговых системах и агентных контурах. Модель основана на архитектуре Qwen, содержит 11,4 млрд параметров и поддерживает контекст до 8192 токенов; в репозитории представлены веса PyTorch.

В карточке указаны английский и китайский языки. Лицензия CC BY-NC-ND 4.0 ограничивает коммерческое использование и распространение производных материалов.

Сценарии применения

  • планирование шагов для языкового агента
  • выбор и вызов инструментов в диалоге
  • рефлексия и корректировка плана агента
  • создание агентных диалоговых систем

Ограничения

Карточка описывает экспериментальную серию агентных моделей, но не приводит количественных оценок качества этой версии. Лицензия CC BY-NC-ND 4.0 запрещает коммерческое использование и распространение производных материалов.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

KwaiAgents (Github) is a series of Agent-related works open-sourced by the KwaiKEG from Kuaishou Technology. The open-sourced content includes:

  1. KAgentSys-Lite: An experimental Agent Loop implemented based on open-source search engines, browsers, time, calendar, weather, and other tools, which is only missing the memory mechanism and some search capabilities compared to the system in the paper.
  2. KAgentLMs: A series of large language models with Agent capabilities such as planning, reflection, and tool-use, acquired through the Meta-agent tuning proposed in the paper.
  3. KAgentInstruct: Fine-tuned data of instructions generated by the Meta-agent in the paper.
  4. KAgentBench: Over 3,000 human-edited, automated evaluation data for testing Agent capabilities, with evaluation dimensions including planning, tool-use, reflection, concluding, and profiling.

User Guide

Direct usage

Tutorial can refer to QwenLM/Qwen

from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers.generation import GenerationConfig

tokenizer = AutoTokenizer.from_pretrained("kwaikeg/kagentlms_qwen_7b_mat", trust_remote_code=True)

model = AutoModelForCausalLM.from_pretrained(
    "kwaikeg/kagentlms_qwen_7b_mat",
    device_map="auto",
    trust_remote_code=True
).eval()

response, history = model.chat(tokenizer, "你好", history=None)
print(response)

AgentLMs as service

Serving by vLLM (GPU)

We recommend using vLLM and FastChat to deploy the model inference service. First, you need to install the corresponding packages (for detailed usage, please refer to the documentation of the two projects):

pip install vllm
pip install "fschat[model_worker,webui]"

To deploy KAgentLMs, you first need to start the controller in one terminal.

python -m fastchat.serve.controller

Secondly, you should use the following command in another terminal for single-gpu inference service deployment:

python -m fastchat.serve.vllm_worker --model-path $model_path --trust-remote-code

Where $model_path is the local path of the model downloaded. If the GPU does not support Bfloat16, you can add --dtype half to the command line.

Thirdly, start the REST API server in the third terminal.

python -m fastchat.serve.openai_api_server --host localhost --port 8888

Finally, you can use the curl command to invoke the model same as the OpenAI calling format. Here's an example:

curl http://localhost:8888/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "kagentlms_qwen_7b_mat", "messages": [{"role": "user", "content": "Who is Andy Lau"}]}'

Serving by Lamma.cpp (CPU)

llama-cpp-python offers a web server which aims to act as a drop-in replacement for the OpenAI API. This allows you to use llama.cpp compatible models with any OpenAI compatible client (language libraries, services, etc). The converted model can be found in kwaikeg/kagentlms_qwen_7b_mat_gguf.

To install the server package and get started:

pip install "llama-cpp-python[server]"
python3 -m llama_cpp.server --model kagentlms_qwen_7b_mat_gguf/ggml-model-q4_0.gguf --chat_format chatml --port 8888

Citation

@article{pan2023kwaiagents,
  author    = {Haojie Pan and
               Zepeng Zhai and
               Hao Yuan and
               Yaojia Lv and
               Ruiji Fu and
               Ming Liu and
               Zhongyuan Wang and
               Bing Qin
               },
  title     = {KwaiAgents: Generalized Information-seeking Agent System with Large Language Models},
  journal   = {CoRR},
  volume    = {abs/2312.04889},
  year      = {2023}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
QWenLMHeadModel
Ревизия весов
07c0d02

0 моделей