mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-05-24 16:44:39 -04:00
feat(tooling): add script to auto update readme table of supported
models Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
@@ -649,6 +649,9 @@ class LLMConfig:
|
||||
__openllm_hints__: dict[str, t.Any] = Field(None, init=False)
|
||||
"""An internal cache of resolved types for this LLMConfig."""
|
||||
|
||||
__openllm_url__: str = Field(None, init=False)
|
||||
"""The resolved url for this LLMConfig."""
|
||||
|
||||
GenerationConfig: type = type
|
||||
"""Users can override this subclass of any given LLMConfig to provide GenerationConfig
|
||||
default value. For example:
|
||||
@@ -678,6 +681,7 @@ class LLMConfig:
|
||||
default_timeout: int | None = None,
|
||||
trust_remote_code: bool = False,
|
||||
requires_gpu: bool = False,
|
||||
url: str | None = None,
|
||||
):
|
||||
if name_type == "dasherize":
|
||||
model_name = inflection.underscore(cls.__name__.replace("Config", ""))
|
||||
@@ -694,6 +698,7 @@ class LLMConfig:
|
||||
cls.__openllm_model_name__ = model_name
|
||||
cls.__openllm_start_name__ = start_name
|
||||
cls.__openllm_env__ = openllm.utils.ModelEnv(model_name)
|
||||
cls.__openllm_url__ = url or "(not set)"
|
||||
|
||||
# NOTE: Since we want to enable a pydantic-like experience
|
||||
# this means we will have to hide the attr abstraction, and generate
|
||||
|
||||
@@ -22,6 +22,7 @@ class ChatGLMConfig(
|
||||
trust_remote_code=True,
|
||||
default_timeout=3600000,
|
||||
requires_gpu=True,
|
||||
url="https://github.com/THUDM/ChatGLM-6B",
|
||||
):
|
||||
"""
|
||||
ChatGLM is an open bilingual language model based on
|
||||
|
||||
@@ -20,7 +20,12 @@ from __future__ import annotations
|
||||
import openllm
|
||||
|
||||
|
||||
class DollyV2Config(openllm.LLMConfig, default_timeout=3600000, trust_remote_code=True):
|
||||
class DollyV2Config(
|
||||
openllm.LLMConfig,
|
||||
default_timeout=3600000,
|
||||
trust_remote_code=True,
|
||||
url="https://github.com/databrickslabs/dolly",
|
||||
):
|
||||
"""Databricks’ Dolly is an instruction-following large language model trained on the Databricks
|
||||
machine learning platform that is licensed for commercial use.
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ class FalconConfig(
|
||||
trust_remote_code=True,
|
||||
requires_gpu=True,
|
||||
default_timeout=3600000,
|
||||
url="https://falconllm.tii.ae/",
|
||||
):
|
||||
"""Falcon-7B is a 7B parameters causal decoder-only model built by
|
||||
TII and trained on 1,500B tokens of [RefinedWeb](https://huggingface.co/datasets/tiiuae/falcon-refinedweb)
|
||||
|
||||
@@ -40,7 +40,7 @@ saved pretrained, or a fine-tune FLAN-T5, provide ``OPENLLM_FLAN_T5_PRETRAINED='
|
||||
DEFAULT_PROMPT_TEMPLATE = """Answer the following question:\nQuestion: {instruction}\nAnswer:"""
|
||||
|
||||
|
||||
class FlanT5Config(openllm.LLMConfig):
|
||||
class FlanT5Config(openllm.LLMConfig, url="https://huggingface.co/docs/transformers/model_doc/flan-t5"):
|
||||
"""FLAN-T5 was released in the paper [Scaling Instruction-Finetuned Language Models](https://arxiv.org/pdf/2210.11416.pdf)
|
||||
- it is an enhanced version of T5 that has been finetuned in a mixture of tasks.
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ from __future__ import annotations
|
||||
import openllm
|
||||
|
||||
|
||||
class StableLMConfig(openllm.LLMConfig, name_type="lowercase"):
|
||||
class StableLMConfig(openllm.LLMConfig, name_type="lowercase", url="https://github.com/Stability-AI/StableLM"):
|
||||
"""StableLM-Base-Alpha is a suite of 3B and 7B parameter decoder-only language models
|
||||
pre-trained on a diverse collection of English datasets with a sequence
|
||||
length of 4096 to push beyond the context window limitations of existing open-source language models.
|
||||
|
||||
@@ -16,7 +16,12 @@ from __future__ import annotations
|
||||
import openllm
|
||||
|
||||
|
||||
class StarCoderConfig(openllm.LLMConfig, name_type="lowercase", requires_gpu=True):
|
||||
class StarCoderConfig(
|
||||
openllm.LLMConfig,
|
||||
name_type="lowercase",
|
||||
requires_gpu=True,
|
||||
url="https://github.com/bigcode-project/starcoder",
|
||||
):
|
||||
"""The StarCoder models are 15.5B parameter models trained on 80+ programming languages from
|
||||
[The Stack (v1.2)](https://huggingface.co/datasets/bigcode/the-stack), with opt-out requests excluded.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user