forked from xorbitsai/inference
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63e4133
commit fac7873
Showing
18 changed files
with
846 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: 2 | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: doc/source/conf.py | ||
|
||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: "3.9" | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: python | ||
extra_requirements: | ||
- doc | ||
|
||
submodules: | ||
include: all | ||
recursive: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SPHINXINTL ?= sphinx-intl | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# the i18n builder cannot share the environment and doctrees with the others | ||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCEDIR) | ||
I18NSPHINXLANGS = -l zh_CN | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile html_zh_cn gettext | ||
|
||
html_zh_cn: | ||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) -t zh_cn -D language='zh_CN' "$(SOURCEDIR)" $(BUILDDIR)/html_zh_cn | ||
gettext: | ||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale | ||
$(SPHINXINTL) update -p $(BUILDDIR)/locale $(I18NSPHINXLANGS) | ||
python $(SOURCEDIR)/norm_zh.py | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
# import os | ||
# import sys | ||
# sys.path.insert(0, os.path.abspath('.')) | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'Xinference' | ||
copyright = '2023, Xorbits Inc.' | ||
author = 'xorbitsai' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
"sphinx.ext.mathjax", | ||
"sphinx.ext.ifconfig", | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.viewcode", | ||
"sphinx.ext.githubpages", | ||
"sphinx.ext.autosummary", | ||
"sphinx.ext.napoleon", | ||
"IPython.sphinxext.ipython_directive", | ||
"IPython.sphinxext.ipython_console_highlighting", | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = [] | ||
|
||
# i18n | ||
locale_dirs = ["locale/"] # path is example but recommended. | ||
gettext_compact = False # optional | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = 'pydata_sphinx_theme' | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ['_static'] | ||
|
||
html_theme_options = { | ||
"icon_links": [ | ||
{ | ||
"name": "GitHub", | ||
"url": "https://github.com/xorbitsai/inference", | ||
"icon": "fa-brands fa-github", | ||
"type": "fontawesome", | ||
}, | ||
] | ||
} | ||
|
||
html_favicon = "_static/favicon.svg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.. _getting_started_index: | ||
|
||
=============== | ||
Getting Started | ||
=============== | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
.. _index: | ||
|
||
Xorbits Inference: Model Serving Made Easy🤖 | ||
"""""""""""""""""""""""""""""""""""""""""""" | ||
|
||
Xorbits Inference(Xinference) is a powerful and versatile library designed to serve language, | ||
speech recognition, and multimodal models. With Xorbits Inference, you can effortlessly deploy | ||
and serve your or state-of-the-art built-in models using just a single command. Whether you are a | ||
researcher, developer, or data scientist, Xorbits Inference empowers you to unleash the full | ||
potential of cutting-edge AI models. | ||
|
||
|
||
Key Features | ||
------------ | ||
|
||
🌟 **Model Serving Made Easy**: Simplify the process of serving large language, speech | ||
recognition, and multimodal models. You can set up and deploy your models | ||
for experimentation and production with a single command. | ||
|
||
⚡️ **State-of-the-Art Models**: Experiment with cutting-edge built-in models using a single | ||
command. Inference provides access to state-of-the-art open-source models! | ||
|
||
🖥 **Heterogeneous Hardware Utilization**: Make the most of your hardware resources with | ||
`ggml <https://github.com/ggerganov/ggml>`_. Xorbits Inference intelligently utilizes heterogeneous | ||
hardware, including GPUs and CPUs, to accelerate your model inference tasks. | ||
|
||
⚙️ **Flexible API and Interfaces**: Offer multiple interfaces for interacting | ||
with your models, supporting RPC, RESTful API(compatible with OpenAI API), CLI and WebUI | ||
for seamless management and monitoring. | ||
|
||
🌐 **Distributed Deployment**: Excel in distributed deployment scenarios, | ||
allowing the seamless distribution of model inference across multiple devices or machines. | ||
|
||
🔌 **Built-in Integration with Third-Party Libraries**: Xorbits Inference seamlessly integrates | ||
with popular third-party libraries like LangChain and LlamaIndex. (Coming soon) | ||
|
||
|
||
Installation | ||
------------ | ||
Xinference can be installed via pip from PyPI. It is highly recommended to create a new virtual | ||
environment to avoid conflicts:: | ||
|
||
pip install "xinference[all]" | ||
|
||
|
||
``xinference[all]`` installs all the necessary packages for serving models. If you want to achieve acceleration on | ||
different hardware, refer to the installation documentation of the corresponding package. | ||
|
||
* `llama-cpp-python <https://github.com/abetlen/llama-cpp-python#installation-from-pypi-recommended>`_ is required to run ``baichuan``, ``wizardlm-v1.0``, ``vicuna-v1.3`` and ``orca``. | ||
* `chatglm-cpp-python <https://github.com/li-plus/chatglm.cpp#getting-started>`_ is required to run ``chatglm`` and ``chatglm2``. | ||
|
||
|
||
Builtin models | ||
-------------- | ||
|
||
To view the builtin models, run the following command:: | ||
|
||
xinference list --all | ||
|
||
|
||
+-------------------+------------------+-----------+---------+--------------------+-----------------------------------------+ | ||
| Name | Type | Language | Format | Size (in billions) | Quantization | | ||
+===================+==================+===========+=========+====================+=========================================+ | ||
| baichuan | Foundation Model | en, zh | ggmlv3 | 7 | 'q2_K', 'q3_K_L', ... , 'q6_K', 'q8_0' | | ||
+-------------------+------------------+-----------+---------+--------------------+-----------------------------------------+ | ||
| chatglm | SFT Model | en, zh | ggmlv3 | 6 | 'q4_0', 'q4_1', 'q5_0', 'q5_1', 'q8_0' | | ||
+-------------------+------------------+-----------+---------+--------------------+-----------------------------------------+ | ||
| chatglm2 | SFT Model | en, zh | ggmlv3 | 6 | 'q4_0', 'q4_1', 'q5_0', 'q5_1', 'q8_0' | | ||
+-------------------+------------------+-----------+---------+--------------------+-----------------------------------------+ | ||
| wizardlm-v1.0 | SFT Model | en | ggmlv3 | 7, 13, 33 | 'q2_K', 'q3_K_L', ... , 'q6_K', 'q8_0' | | ||
+-------------------+------------------+-----------+---------+--------------------+-----------------------------------------+ | ||
| wizardlm-v1.1 | SFT Model | en | ggmlv3 | 13 | 'q2_K', 'q3_K_L', ... , 'q6_K', 'q8_0' | | ||
+-------------------+------------------+-----------+---------+--------------------+-----------------------------------------+ | ||
| vicuna-v1.3 | SFT Model | en | ggmlv3 | 7, 13 | 'q2_K', 'q3_K_L', ... , 'q6_K', 'q8_0' | | ||
+-------------------+------------------+-----------+---------+--------------------+-----------------------------------------+ | ||
| orca | SFT Model | en | ggmlv3 | 3, 7, 13 | 'q4_0', 'q4_1', 'q5_0', 'q5_1', 'q8_0' | | ||
+-------------------+------------------+-----------+---------+--------------------+-----------------------------------------+ | ||
|
||
License | ||
------- | ||
`Apache 2 <https://github.com/xorbitsai/inference/blob/main/LICENSE>`_ | ||
|
||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:hidden: | ||
|
||
getting_started/index | ||
user_guide/index | ||
reference/index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) 2023, Xorbits Inc. | ||
# This file is distributed under the same license as the Xinference package. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Xinference \n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-07-18 10:54+0800\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language: zh_CN\n" | ||
"Language-Team: zh_CN <[email protected]>\n" | ||
"Plural-Forms: nplurals=1; plural=0;\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Babel 2.12.1\n" | ||
|
||
#: ../../source/getting_started/index.rst:5 | ||
msgid "Getting Started" | ||
msgstr "" | ||
|
25 changes: 25 additions & 0 deletions
25
doc/source/locale/zh_CN/LC_MESSAGES/getting_started/index.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) 2023, Xorbits Inc. | ||
# This file is distributed under the same license as the Xinference package. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Xinference \n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-07-18 11:00+0800\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language: zh_CN\n" | ||
"Language-Team: zh_CN <[email protected]>\n" | ||
"Plural-Forms: nplurals=1; plural=0;\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Babel 2.12.1\n" | ||
|
||
#: ../../source/getting_started/index.rst:5 | ||
msgid "Getting Started" | ||
msgstr "" | ||
|
Oops, something went wrong.