Skip to main content

大模型训练,评估,推理,部署工具

Project description

OSC-LLM

PyTorch Lightning

📌   简介

osc-llm旨在成为一个简单易用的大模型训练、评估、推理、部署工具,支持主流的大模型。

文档地址:

📌   安装

📌   快速开始

# 下面以llama3为例演示如何转换为osc-llm格式,并进行聊天。
# 假设你已经下载好huggingface的llama3模型在checkpoints/meta-llama目录下
# 1. 转换
llm convert --checkpoint_dir checkpoints/meta-llama/Meta-Llama-3-8B-Instruct
# 2. 量化
llm quantize int8 --checkpoint_dir checkpoints/meta-llama/Meta-Llama-3-8B-Instruct --save_dir checkpoints/meta-llama/Meta-Llama-3-8B-Instruct-int8
# 3. 聊天(使用编译功能加速推理速度,需要等待几分钟编译时间)
llm chat --checkpoint_dir checkpoints/meta-llama/Meta-Llama-3-8B-Instruct-int8 --compile true
# 4. 部署
llm serve --checkpoint_dir checkpoints/meta-llama/Meta-Llama-3-8B-Instruct-int8

📌   模型支持

以下huggingface中的模型结构(查看config.json)已经支持转换为osc-llm格式:

  • LlamaForCausalLM: llama2, llama3, chinese-alpaca2等。
  • Qwen2ForCausalLM: qwen1.5系列。
  • Qwen2MoeForCausalLM: qwen2-moe系列(目前无法完成编译,推理速度很慢)。

致敬

本项目参考了大量的开源项目,特别是以下项目:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osc_llm-0.1.5.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

osc_llm-0.1.5-py3-none-any.whl (49.7 kB view details)

Uploaded Python 3

File details

Details for the file osc_llm-0.1.5.tar.gz.

File metadata

  • Download URL: osc_llm-0.1.5.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for osc_llm-0.1.5.tar.gz
Algorithm Hash digest
SHA256 0c017e2aee2ef05bf9e132dc5f558e84d8dfdcc8194b0df1d2ddf244fb545a7e
MD5 017e080a476f7ad6774c886430ddb4dd
BLAKE2b-256 51f36861dd00c6af54d1cd99f59c6184b0e48260fc1f3fb36fbb02e29aa05650

See more details on using hashes here.

File details

Details for the file osc_llm-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: osc_llm-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 49.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for osc_llm-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b87436b972a9811e47e63c25520c8e338031bd4f9c26a04174a1feff9c5f184d
MD5 745aa2785c6bc8745f5fa3292f30db94
BLAKE2b-256 caab260be1536d16ca2fd57840bcb3bb23d08e5c04eafc59adb81454b0387670

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page