id
int64
0
190k
prompt
stringlengths
21
13.4M
docstring
stringlengths
1
12k
189,315
import importlib, importlib.metadata, importlib.util, os, inspect, typing as t from .codegen import _make_method from ._constants import ENV_VARS_TRUE_VALUES as ENV_VARS_TRUE_VALUES def _has_package(package: str) -> bool: _package_available = importlib.util.find_spec(package) is not None if _package_available: ...
null
189,316
import importlib, importlib.metadata, importlib.util, os, inspect, typing as t from .codegen import _make_method from ._constants import ENV_VARS_TRUE_VALUES as ENV_VARS_TRUE_VALUES _autoawq_available = importlib.util.find_spec('awq') is not None def is_autoawq_available() -> bool: global _autoawq_available try: ...
null
189,317
import importlib, importlib.metadata, importlib.util, os, inspect, typing as t from .codegen import _make_method from ._constants import ENV_VARS_TRUE_VALUES as ENV_VARS_TRUE_VALUES ENV_VARS_TRUE_AND_AUTO_VALUES = ENV_VARS_TRUE_VALUES.union({'AUTO'}) USE_VLLM = os.getenv('USE_VLLM', 'AUTO').upper() _vllm_available = im...
null
189,318
import importlib, importlib.metadata, importlib.util, os, inspect, typing as t from .codegen import _make_method from ._constants import ENV_VARS_TRUE_VALUES as ENV_VARS_TRUE_VALUES caller = { f'is_{k}': _make_method( f'is_{k}', f'def is_{k}() -> bool:\n global _{k}\n return _{k}\n', f'generated_file_{k}', {f'_...
null
189,319
import importlib, importlib.metadata, importlib.util, os, inspect, typing as t from .codegen import _make_method from ._constants import ENV_VARS_TRUE_VALUES as ENV_VARS_TRUE_VALUES caller = { f'is_{k}': _make_method( f'is_{k}', f'def is_{k}() -> bool:\n global _{k}\n return _{k}\n', f'generated_file_{k}', {f'_...
null
189,320
import sys, os ENV_VARS_TRUE_VALUES = {'1', 'ON', 'YES', 'TRUE'} def check_bool_env(env: str, default: bool = True): v = os.getenv(env, default=str(default)).upper() if v.isdigit(): return bool(int(v)) # special check for digits return v in ENV_VARS_TRUE_VALUES
null
189,321
from __future__ import annotations import functools import inspect import linecache import logging import types import typing as t from operator import itemgetter from ._constants import SHOW_CODEGEN import orjson if t.TYPE_CHECKING: import openllm_core from openllm_core._typing_compat import AnyCallable, DictStrAn...
null
189,322
from __future__ import annotations import functools import inspect import linecache import logging import types import typing as t from operator import itemgetter from ._constants import SHOW_CODEGEN import orjson if t.TYPE_CHECKING: import openllm_core from openllm_core._typing_compat import AnyCallable, DictStrAn...
null
189,323
from __future__ import annotations import functools import inspect import linecache import logging import types import typing as t from operator import itemgetter from ._constants import SHOW_CODEGEN import orjson if t.TYPE_CHECKING: import openllm_core from openllm_core._typing_compat import AnyCallable, DictStrAn...
null
189,324
from __future__ import annotations import functools import inspect import linecache import logging import types import typing as t from operator import itemgetter from ._constants import SHOW_CODEGEN import orjson if t.TYPE_CHECKING: import openllm_core from openllm_core._typing_compat import AnyCallable, DictStrAn...
Create a tuple subclass to hold class attributes. The subclass is a bare tuple with properties for names. class MyClassAttributes(tuple): __slots__ = () x = property(itemgetter(0))
189,325
from __future__ import annotations import functools import inspect import linecache import logging import types import typing as t from operator import itemgetter from ._constants import SHOW_CODEGEN import orjson if t.TYPE_CHECKING: import openllm_core from openllm_core._typing_compat import AnyCallable, DictStrAn...
null
189,326
from __future__ import annotations import functools import inspect import linecache import logging import types import typing as t from operator import itemgetter from ._constants import SHOW_CODEGEN import orjson if t.TYPE_CHECKING: import openllm_core from openllm_core._typing_compat import AnyCallable, DictStrAn...
null
189,332
from __future__ import annotations import typing as t from datetime import datetime import attr from cattr import Converter from cattr.gen import make_dict_structure_fn, make_dict_unstructure_fn def datetime_structure_hook(dt_like: str | datetime | t.Any, _: t.Any) -> datetime: if isinstance(dt_like, str): retur...
null
189,333
from __future__ import annotations import functools, importlib, os, sys, typing as t from enum import Enum import attr, click, inflection, orjson, click_option_group as cog from click import ParamType, shell_completion as sc, types as click_types from .._typing_compat import overload, Unpack __all__ = [ 'CUDA', 'FC...
null
189,334
from __future__ import annotations import functools, importlib, os, sys, typing as t from enum import Enum import attr, click, inflection, orjson, click_option_group as cog from click import ParamType, shell_completion as sc, types as click_types from .._typing_compat import overload, Unpack if t.TYPE_CHECKING: from ...
null
189,335
from __future__ import annotations import functools, importlib, os, sys, typing as t from enum import Enum import attr, click, inflection, orjson, click_option_group as cog from click import ParamType, shell_completion as sc, types as click_types from .._typing_compat import overload, Unpack if t.TYPE_CHECKING: from ...
null
189,336
from __future__ import annotations import functools, importlib, os, sys, typing as t from enum import Enum import attr, click, inflection, orjson, click_option_group as cog from click import ParamType, shell_completion as sc, types as click_types from .._typing_compat import overload, Unpack if t.TYPE_CHECKING: from ...
null
189,337
from __future__ import annotations import functools, importlib, os, sys, typing as t from enum import Enum import attr, click, inflection, orjson, click_option_group as cog from click import ParamType, shell_completion as sc, types as click_types from .._typing_compat import overload, Unpack if t.TYPE_CHECKING: from ...
null
189,338
from __future__ import annotations import functools, importlib, os, sys, typing as t from enum import Enum import attr, click, inflection, orjson, click_option_group as cog from click import ParamType, shell_completion as sc, types as click_types from .._typing_compat import overload, Unpack def _get_argv_encoding() -...
null
189,339
from __future__ import annotations import functools, importlib, os, sys, typing as t from enum import Enum import attr, click, inflection, orjson, click_option_group as cog from click import ParamType, shell_completion as sc, types as click_types from .._typing_compat import overload, Unpack if sys.platform.startswith(...
null
189,340
from __future__ import annotations import contextlib import functools import importlib.metadata import logging import os import re import typing as t import attr import openllm_core from openllm_core._typing_compat import ParamSpec P = ParamSpec('P') T = t.TypeVar('T') logger = logging.getLogger(__name__) def _usage_ev...
null
189,341
from __future__ import annotations import contextlib import functools import importlib.metadata import logging import os import re import typing as t import attr import openllm_core from openllm_core._typing_compat import ParamSpec def do_not_track() -> bool: return openllm_core.utils.check_bool_env(OPENLLM_DO_NOT_TR...
null
189,342
from __future__ import annotations import contextlib import functools import importlib.metadata import logging import os import re import typing as t import attr import openllm_core from openllm_core._typing_compat import ParamSpec def do_not_track() -> bool: return openllm_core.utils.check_bool_env(OPENLLM_DO_NOT_TR...
null
189,343
from __future__ import annotations import enum import typing as t import attr import inflection from deepmerge import Merger from . import dantic from ..exceptions import ForbiddenAttributeError class PeftType(str, enum.Enum, metaclass=_PeftEnumMeta): PROMPT_TUNING = 'PROMPT_TUNING' MULTITASK_PROMPT_TUNING = 'MULTI...
null
189,344
from __future__ import annotations import importlib.metadata, logging, os, pathlib import bentoml, orjson, openllm_core from simple_di import Provide, inject from bentoml._internal.bento.build_config import BentoBuildConfig, DockerOptions, ModelSpec, PythonOptions from bentoml._internal.configuration.containers import ...
null
189,346
import functools, importlib.metadata, openllm_core def generate_labels(serialisation): return { 'framework': 'openllm', 'serialisation': serialisation, **{package: importlib.metadata.version(package) for package in {'openllm', 'openllm-core', 'openllm-client'}}, }
null
189,347
import functools, importlib.metadata, openllm_core def available_devices(): from ._strategies import NvidiaGpuResource return tuple(NvidiaGpuResource.from_system()) def device_count() -> int: return len(available_devices())
null
189,348
import functools, importlib.metadata, openllm_core __all__ = ['available_devices', 'device_count', 'generate_labels'] def __dir__(): coreutils = set(dir(openllm_core.utils)) | set([it for it in openllm_core.utils._extras if not it.startswith('_')]) return sorted(__all__) + sorted(list(coreutils))
null
189,349
import functools, importlib.metadata, openllm_core def __getattr__(it): if hasattr(openllm_core.utils, it): return getattr(openllm_core.utils, it) raise AttributeError(f'module {__name__} has no attribute {it}')
null
189,350
def __dir__(): import openllm_client as _client return sorted(dir(_client))
null
189,351
def __getattr__(it): import openllm_client as _client return getattr(_client, it)
null
189,352
from __future__ import annotations import gc, types, typing as t import torch, bentoml, openllm from openllm_core._schemas import CompletionChunk, GenerationOutput, SampleLogprobs from openllm_core.utils import ReprMixin, is_vllm_available _registry = {} def registry(cls=None, *, alias=None): def decorator(_cls): ...
null
189,353
from __future__ import annotations import gc, types, typing as t import torch, bentoml, openllm from openllm_core._schemas import CompletionChunk, GenerationOutput, SampleLogprobs from openllm_core.utils import ReprMixin, is_vllm_available _registry = {} M = TypeVar('M') T = TypeVar('T') def runner(llm: openllm.LLM[M...
null
189,354
from __future__ import annotations from openllm_core.exceptions import MissingDependencyError from openllm_core.utils import is_autoawq_available, is_autogptq_available, is_bitsandbytes_available class MissingDependencyError(BaseException): """Raised when a dependency is missing.""" def infer_quantisation_config(ll...
null
189,355
from __future__ import annotations import inspect, logging, math, os, sys, types, warnings, typing as t import psutil, bentoml, openllm_core.utils as coreutils from bentoml._internal.resource import get_resource, system_resources from bentoml._internal.runner.strategy import THREAD_ENVS def _strtoul(s: str) -> int: def...
null
189,356
from __future__ import annotations import inspect, logging, math, os, sys, types, warnings, typing as t import psutil, bentoml, openllm_core.utils as coreutils from bentoml._internal.resource import get_resource, system_resources from bentoml._internal.runner.strategy import THREAD_ENVS def _raw_device_uuid_nvml() -> ...
null
189,357
from __future__ import annotations import inspect, logging, math, os, sys, types, warnings, typing as t import psutil, bentoml, openllm_core.utils as coreutils from bentoml._internal.resource import get_resource, system_resources from bentoml._internal.runner.strategy import THREAD_ENVS class _ResourceMixin: def f...
null
189,358
from __future__ import annotations import contextlib, attr, bentoml, openllm, types, logging, typing as t from simple_di import Provide, inject from bentoml._internal.configuration.containers import BentoMLContainer from openllm_core._typing_compat import LiteralSerialisation, LiteralQuantise, LiteralBackend _object_se...
null
189,359
from __future__ import annotations import contextlib, attr, bentoml, openllm, types, logging, typing as t from simple_di import Provide, inject from bentoml._internal.configuration.containers import BentoMLContainer from openllm_core._typing_compat import LiteralSerialisation, LiteralQuantise, LiteralBackend def get_ha...
null
189,360
from __future__ import annotations import contextlib, attr, bentoml, openllm, types, logging, typing as t from simple_di import Provide, inject from bentoml._internal.configuration.containers import BentoMLContainer from openllm_core._typing_compat import LiteralSerialisation, LiteralQuantise, LiteralBackend def get_ha...
null
189,361
from __future__ import annotations import attr, traceback, functools, pathlib, typing as t from huggingface_hub import HfApi from openllm_core.exceptions import Error from openllm_core.utils import resolve_filepath, validate_is_path def ModelInfo(model_id: str, revision: str | None = None) -> HfModelInfo: if model_id...
null
189,362
import copy, logging import transformers from openllm.serialisation.constants import HUB_ATTRS def get_tokenizer(model_id_or_path, trust_remote_code, **attrs): tokenizer = transformers.AutoTokenizer.from_pretrained( model_id_or_path, trust_remote_code=trust_remote_code, **attrs ) if tokenizer.pad_token is No...
null
189,363
import copy, logging import transformers from openllm.serialisation.constants import HUB_ATTRS HUB_ATTRS = [ 'cache_dir', 'code_revision', 'force_download', # 'local_files_only', 'proxies', 'resume_download', # 'revision', 'subfolder', 'use_auth_token', # ] def process_config(model_id, trust_remo...
null
189,364
import copy, logging import transformers from openllm.serialisation.constants import HUB_ATTRS logger = logging.getLogger(__name__) def infer_autoclass_from_llm(llm, config, /): autoclass = 'AutoModelForSeq2SeqLM' if llm.config['model_type'] == 'seq2seq_lm' else 'AutoModelForCausalLM' if llm.trust_remote_code: ...
null
189,368
from __future__ import annotations import inspect, logging, math, os, sys, types, warnings, typing as t import psutil, bentoml, openllm_core.utils as coreutils from bentoml._internal.resource import get_resource, system_resources from bentoml._internal.runner.strategy import THREAD_ENVS def _strtoul(s: str) -> int: #...
null
189,373
import functools, logging from http import HTTPStatus import orjson from starlette.applications import Starlette from starlette.responses import JSONResponse from starlette.routing import Route from openllm_core.utils import converter from ._openapi import add_schema_definitions, append_schemas, get_generator from ..pr...
null
189,374
from __future__ import annotations import functools import inspect import types import typing as t import attr from starlette.routing import Host, Mount, Route from starlette.schemas import EndpointInfo, SchemaGenerator from openllm_core.utils import first_not_none _SCHEMAS = {k[:-7].lower(): v for k, v in locals().ite...
null
189,375
from __future__ import annotations import functools import inspect import types import typing as t import attr from starlette.routing import Host, Mount, Route from starlette.schemas import EndpointInfo, SchemaGenerator from openllm_core.utils import first_not_none OPENAPI_VERSION, API_VERSION = '3.0.2', '1.0' class Op...
null
189,376
import functools import logging import time import traceback from http import HTTPStatus import orjson from starlette.applications import Starlette from starlette.responses import JSONResponse, StreamingResponse from starlette.routing import Route from openllm_core.utils import converter, gen_random_uuid from ._openapi...
null
189,377
import functools import logging import time import traceback from http import HTTPStatus import orjson from starlette.applications import Starlette from starlette.responses import JSONResponse, StreamingResponse from starlette.routing import Route from openllm_core.utils import converter, gen_random_uuid from ._openapi...
null
189,381
from __future__ import annotations import functools, logging, os, warnings, typing as t import attr, orjson, bentoml, openllm, openllm_core from openllm_core._schemas import GenerationOutput from openllm_core._typing_compat import ( AdapterMap, AdapterTuple, AdapterType, LiteralBackend, LiteralDtype, Litera...
null
189,382
from __future__ import annotations import functools, logging, os, warnings, typing as t import attr, orjson, bentoml, openllm, openllm_core from openllm_core._schemas import GenerationOutput from openllm_core._typing_compat import ( AdapterMap, AdapterTuple, AdapterType, LiteralBackend, LiteralDtype, Litera...
null
189,383
def prepare_logits_processor(config): import transformers generation_config = config.generation_config logits_processor = transformers.LogitsProcessorList() if generation_config['temperature'] >= 1e-5 and generation_config['temperature'] != 1.0: logits_processor.append(transformers.TemperatureLogitsWarpe...
null
189,384
SEQLEN_KEYS = ['max_sequence_length', 'seq_length', 'max_position_embeddings', 'max_seq_len', 'model_max_length'] def get_context_length(config): rope_scaling = getattr(config, 'rope_scaling', None) rope_scaling_factor = config.rope_scaling['factor'] if rope_scaling else 1.0 for key in SEQLEN_KEYS: if getatt...
null
189,385
def is_sentence_complete(output): return output.endswith(('.', '?', '!', '...', '。', '?', '!', '…', '"', "'", '”'))
null
189,386
def is_partial_stop(output, stop_str): for i in range(min(len(output), len(stop_str))): if stop_str.startswith(output[-i:]): return True return False
null
189,397
from __future__ import annotations import logging, os, warnings, typing as t import openllm from openllm_core._typing_compat import LiteralBackend from openllm_core.utils import first_not_none, getenv, is_vllm_available logger = logging.getLogger(__name__) LiteralBackend = Literal['pt', 'vllm', 'triton', 'ggml'] def ...
null
189,398
from __future__ import annotations import openllm, traceback, logging, time, pathlib, pydantic, typing as t from openllm_core.exceptions import ModelNotFound, OpenLLMException, ValidationError from openllm_core.utils import gen_random_uuid, resolve_filepath from openllm_core.protocol.openai import ( ChatCompletionReq...
null
189,399
from __future__ import annotations import os, logging, traceback, pathlib, sys, fs, click, enum, inflection, bentoml, orjson, openllm, openllm_core, platform, typing as t from ._helpers import recommended_instance_type from openllm_core.utils import ( DEBUG_ENV_VAR, QUIET_ENV_VAR, SHOW_CODEGEN, check_bool_env, ...
\b ██████╗ ██████╗ ███████╗███╗ ██╗██╗ ██╗ ███╗ ███╗ ██╔═══██╗██╔══██╗██╔════╝████╗ ██║██║ ██║ ████╗ ████║ ██║ ██║██████╔╝█████╗ ██╔██╗ ██║██║ ██║ ██╔████╔██║ ██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║██║ ██║ ██║╚██╔╝██║ ╚██████╔╝██║ ███████╗██║ ╚████║███████╗███████╗██║ ╚═╝ ██║ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝╚══════╝╚══════╝╚═╝ ╚...
189,400
from __future__ import annotations import os, logging, traceback, pathlib, sys, fs, click, enum, inflection, bentoml, orjson, openllm, openllm_core, platform, typing as t from ._helpers import recommended_instance_type from openllm_core.utils import ( DEBUG_ENV_VAR, QUIET_ENV_VAR, SHOW_CODEGEN, check_bool_env, ...
null
189,401
from __future__ import annotations import os, logging, traceback, pathlib, sys, fs, click, enum, inflection, bentoml, orjson, openllm, openllm_core, platform, typing as t from ._helpers import recommended_instance_type from openllm_core.utils import ( DEBUG_ENV_VAR, QUIET_ENV_VAR, SHOW_CODEGEN, check_bool_env, ...
null
189,402
from __future__ import annotations import os, logging, traceback, pathlib, sys, fs, click, enum, inflection, bentoml, orjson, openllm, openllm_core, platform, typing as t from ._helpers import recommended_instance_type from openllm_core.utils import ( DEBUG_ENV_VAR, QUIET_ENV_VAR, SHOW_CODEGEN, check_bool_env, ...
Start any LLM as a REST server. \b ```bash $ openllm <start|start-http> <model_id> --<options> ... ```
189,403
from __future__ import annotations import os, logging, traceback, pathlib, sys, fs, click, enum, inflection, bentoml, orjson, openllm, openllm_core, platform, typing as t from ._helpers import recommended_instance_type from openllm_core.utils import ( DEBUG_ENV_VAR, QUIET_ENV_VAR, SHOW_CODEGEN, check_bool_env, ...
Package a given models into a BentoLLM. \b ```bash $ openllm build google/flan-t5-large ``` \b > [!NOTE] > To run a container built from this Bento with GPU support, make sure > to have https://github.com/NVIDIA/nvidia-container-toolkit install locally. \b > [!IMPORTANT] > To build the bento with compiled OpenLLM, make...
189,404
from __future__ import annotations import inspect, orjson, dataclasses, bentoml, functools, attr, openllm_core, traceback, openllm, typing as t from openllm_core.utils import ( get_debug_mode, is_vllm_available, normalise_model_name, gen_random_uuid, dict_filter_none, ) from openllm_core._typing_compat import...
null
189,405
from __future__ import annotations import dataclasses import logging import os import sys import typing as t import torch import transformers import openllm from functools import partial from itertools import chain from random import randint, randrange import bitsandbytes as bnb from datasets import load_dataset def pr...
null
189,406
from __future__ import annotations import dataclasses import logging import os import sys import typing as t import transformers import openllm from datasets import load_dataset if t.TYPE_CHECKING: from peft import PeftModel class TrainingArguments: per_device_train_batch_size: int = dataclasses.field(default=4) ...
null
189,407
from __future__ import annotations import argparse import asyncio import logging import typing as t import openllm async def main() -> int: parser = argparse.ArgumentParser() parser.add_argument('question', default=question) if openllm.utils.in_notebook(): args = parser.parse_args(args=[question]) else: ...
null
189,408
from __future__ import annotations import logging import string import typing as t import attr import click import inflection import orjson from bentoml_cli.utils import opt_callback import openllm from openllm_cli import termui from openllm_cli._factory import model_complete_envvar logger = logging.getLogger(__name__)...
Helpers for generating prompts. \b It accepts remote HF model_ids as well as model name passed to `openllm start`. If you pass in a HF model_id, then it will use the tokenizer to generate the prompt. ```bash openllm get-prompt WizardLM/WizardCoder-15B-V1.0 "Hello there" ``` If you need change the prompt template, you c...
189,409
from __future__ import annotations import typing as t import click import inflection import orjson import bentoml import openllm from bentoml._internal.utils import human_readable_size from openllm_cli import termui from openllm_cli._factory import model_complete_envvar, model_name_argument DictStrAny = Dict[str, Any]...
List available models in local store to be used with OpenLLM.
189,410
from __future__ import annotations import importlib.machinery import logging import os import pkgutil import subprocess import sys import tempfile import typing as t import click import jupytext import nbformat import yaml from openllm_cli import playground, termui from openllm_core.utils import is_jupyter_available, i...
OpenLLM Playground. A collections of notebooks to explore the capabilities of OpenLLM. This includes notebooks for fine-tuning, inference, and more. All of the script available in the playground can also be run directly as a Python script: For example: \b ```bash python -m openllm.playground.falcon_tuned --help ``` \b ...
189,411
from __future__ import annotations import shutil import subprocess import typing as t import click import psutil from simple_di import Provide, inject import bentoml from bentoml._internal.configuration.containers import BentoMLContainer from openllm_cli import termui from openllm_cli._factory import bento_complete_env...
Dive into a BentoLLM. This is synonymous to cd $(b get <bento>:<tag> -o path).
189,412
from __future__ import annotations import typing as t import click from simple_di import Provide, inject import bentoml from bentoml._internal.bento.bento import BentoInfo from bentoml._internal.bento.build_config import DockerOptions from bentoml._internal.configuration.containers import BentoMLContainer from bentoml....
null
189,413
from __future__ import annotations import click import inflection import orjson import bentoml import openllm from bentoml._internal.utils import human_readable_size from openllm_cli import termui The provided code snippet includes necessary dependencies for implementing the `cli` function. Write a Python function `de...
List available bentos built by OpenLLM.
189,414
from __future__ import annotations import itertools, logging, os, re, subprocess, sys, typing as t, bentoml, openllm_core, orjson from simple_di import Provide, inject from bentoml._internal.configuration.containers import BentoMLContainer from openllm_core._typing_compat import LiteralSerialisation from openllm_core.e...
Python API to start a LLM server. These provides one-to-one mapping to CLI arguments. For all additional arguments, pass it as string to ``additional_args``. For example, if you want to pass ``--port 5001``, you can pass ``additional_args=["--port", "5001"]`` > [!NOTE] This will create a blocking process, so if you use...
189,415
from __future__ import annotations import itertools, logging, os, re, subprocess, sys, typing as t, bentoml, openllm_core, orjson from simple_di import Provide, inject from bentoml._internal.configuration.containers import BentoMLContainer from openllm_core._typing_compat import LiteralSerialisation from openllm_core.e...
Package a LLM into a BentoLLM. The LLM will be built into a BentoService with the following structure: if ``quantize`` is passed, it will instruct the model to be quantized dynamically during serving time. ``openllm.build`` will invoke ``click.Command`` under the hood, so it behaves exactly the same as ``openllm build`...
189,416
from __future__ import annotations import itertools, logging, os, re, subprocess, sys, typing as t, bentoml, openllm_core, orjson from simple_di import Provide, inject from bentoml._internal.configuration.containers import BentoMLContainer from openllm_core._typing_compat import LiteralSerialisation from openllm_core.e...
Import a LLM into local store. > [!NOTE] > If ``quantize`` is passed, the model weights will be saved as quantized weights. You should > only use this option if you want the weight to be quantized by default. Note that OpenLLM also > support on-demand quantisation during initial startup. ``openllm.import_model`` will i...
189,417
from __future__ import annotations import itertools, logging, os, re, subprocess, sys, typing as t, bentoml, openllm_core, orjson from simple_di import Provide, inject from bentoml._internal.configuration.containers import BentoMLContainer from openllm_core._typing_compat import LiteralSerialisation from openllm_core.e...
List all available models within the local store.
189,418
from __future__ import annotations import functools, logging, os, typing as t import bentoml, openllm, click, inflection, click_option_group as cog from bentoml_cli.utils import BentoMLCommandGroup from click import shell_completion as sc from openllm_core._configuration import LLMConfig from openllm_core._typing_compa...
null
189,419
from __future__ import annotations import functools, logging, os, typing as t import bentoml, openllm, click, inflection, click_option_group as cog from bentoml_cli.utils import BentoMLCommandGroup from click import shell_completion as sc from openllm_core._configuration import LLMConfig from openllm_core._typing_compa...
null
189,420
from __future__ import annotations import functools, logging, os, typing as t import bentoml, openllm, click, inflection, click_option_group as cog from bentoml_cli.utils import BentoMLCommandGroup from click import shell_completion as sc from openllm_core._configuration import LLMConfig from openllm_core._typing_compa...
null
189,421
from __future__ import annotations import functools, logging, os, typing as t import bentoml, openllm, click, inflection, click_option_group as cog from bentoml_cli.utils import BentoMLCommandGroup from click import shell_completion as sc from openllm_core._configuration import LLMConfig from openllm_core._typing_compa...
null
189,422
from __future__ import annotations import functools, logging, os, typing as t import bentoml, openllm, click, inflection, click_option_group as cog from bentoml_cli.utils import BentoMLCommandGroup from click import shell_completion as sc from openllm_core._configuration import LLMConfig from openllm_core._typing_compa...
null
189,423
from __future__ import annotations import functools, logging, os, typing as t import bentoml, openllm, click, inflection, click_option_group as cog from bentoml_cli.utils import BentoMLCommandGroup from click import shell_completion as sc from openllm_core._configuration import LLMConfig from openllm_core._typing_compa...
General ``@click`` decorator with some sauce. This decorator extends the default ``@click.option`` plus a factory option and factory attr to provide type-safe click.option or click.argument wrapper for all compatible factory.
189,424
from __future__ import annotations import functools, logging, os, typing as t import bentoml, openllm, click, inflection, click_option_group as cog from bentoml_cli.utils import BentoMLCommandGroup from click import shell_completion as sc from openllm_core._configuration import LLMConfig from openllm_core._typing_compa...
null
189,425
from __future__ import annotations import functools, logging, os, typing as t import bentoml, openllm, click, inflection, click_option_group as cog from bentoml_cli.utils import BentoMLCommandGroup from click import shell_completion as sc from openllm_core._configuration import LLMConfig from openllm_core._typing_compa...
null
189,426
from __future__ import annotations import functools, logging, os, typing as t import bentoml, openllm, click, inflection, click_option_group as cog from bentoml_cli.utils import BentoMLCommandGroup from click import shell_completion as sc from openllm_core._configuration import LLMConfig from openllm_core._typing_compa...
null
189,427
from __future__ import annotations import functools, logging, os, typing as t import bentoml, openllm, click, inflection, click_option_group as cog from bentoml_cli.utils import BentoMLCommandGroup from click import shell_completion as sc from openllm_core._configuration import LLMConfig from openllm_core._typing_compa...
null
189,428
from __future__ import annotations import os, typing as t, fs from pathlib import Path from ghapi.all import GhApi from jinja2 import Environment from jinja2.loaders import FileSystemLoader from plumbum.cmd import curl, cut, shasum if t.TYPE_CHECKING: from plumbum.commands.base import Pipeline _gz_strategies: dict[t....
null
189,429
from __future__ import annotations import os, typing as t, fs from pathlib import Path from ghapi.all import GhApi from jinja2 import Environment from jinja2.loaders import FileSystemLoader from plumbum.cmd import curl, cut, shasum def get_release_hash_command(svn_url: str, tag: str) -> Pipeline: return curl['-sSL',...
null
189,430
from __future__ import annotations import dataclasses import os import sys import typing as t import inflection import tomlkit from ghapi.all import GhApi import openllm class Classifier: identifier: t.Dict[str, str] = dataclasses.field( default_factory=lambda: { 'status': 'Development Status', 'envir...
null
189,431
from __future__ import annotations import dataclasses import os import sys import typing as t import inflection import tomlkit from ghapi.all import GhApi import openllm _base_requirements: dict[str, t.Any] = { inflection.dasherize(name): config_cls()['requirements'] for name, config_cls in openllm.CONFIG_MAPPING.i...
null
189,432
from __future__ import annotations import dataclasses import os import sys import typing as t import inflection import tomlkit from ghapi.all import GhApi if t.TYPE_CHECKING: from tomlkit.items import Array, Table import openllm def create_url_table(_info: t.Any) -> Table: table = tomlkit.table() _urls = { '...
null
189,433
from __future__ import annotations import dataclasses import os import sys import typing as t import inflection import tomlkit from ghapi.all import GhApi import openllm def correct_style(it: t.Any) -> t.Any: return it def build_system() -> Table: table = tomlkit.table() table.add('build-backend', 'hatchling.bui...
null
189,434
from __future__ import annotations import dataclasses import os import sys import typing as t import inflection import tomlkit from ghapi.all import GhApi import openllm def correct_style(it: t.Any) -> t.Any: return it def keywords() -> Array: arr = correct_style(tomlkit.array()) arr.extend( [ 'MLOps',...
null
189,435
from __future__ import annotations import dataclasses import os import sys import typing as t import inflection import tomlkit from ghapi.all import GhApi import openllm def build_cli_extensions() -> Table: table = tomlkit.table() table.update({'openllm': '_openllm_tiny._entrypoint:cli'}) return table
null
189,436
import os, shutil, sys, tomlkit from openllm_core.config import CONFIG_MAPPING from openllm_core.config.configuration_auto import CONFIG_TO_ALIAS_NAMES def markdown_noteblock(text: str): return ['\n', f'> **Note:** {text}\n']
null
189,437
import os, shutil, sys, tomlkit from openllm_core.config import CONFIG_MAPPING from openllm_core.config.configuration_auto import CONFIG_TO_ALIAS_NAMES def markdown_importantblock(text: str): return ['\n', f'> **Important:** {text}\n']
null
189,438
from __future__ import annotations import os, sys from pathlib import Path from openllm_core._configuration import GenerationConfig, ModelSettings from openllm_core.config.configuration_auto import CONFIG_MAPPING_NAMES from openllm_core.utils import codegen, import_utils as iutils def process_annotations(annotations: ...
null
189,439
import concurrent.futures import configparser import os from typing import List def pyi_in_subdir(directory: str, git_root: str) -> List[str]: pyi_files = [] for root, _, files in os.walk(directory): for file in files: if file.endswith('.pyi') or file == '_typing_compat.py' or '_openllm_tiny' in file: ...
null
189,440
import concurrent.futures import configparser import os from typing import List _MYPY_CONFIG = { 'pretty': 'true', 'python_version': '3.9', 'show_error_codes': 'true', 'strict': 'true', 'plugins': 'pydantic.mypy', 'ignore_missing_imports': 'true', 'warn_unreachable': 'true', 'explicit_package_bases': 't...
null