python310Packages.openllm-core: init at 0.2.27

This commit is contained in:
natsukium 2023-08-31 14:01:35 +09:00 committed by Yt
parent 5d48d462eb
commit 89be295e69
2 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,84 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, accelerate
, attrs
, bentoml
, bitsandbytes
, cattrs
, datasets
, hatch-fancy-pypi-readme
, hatch-vcs
, hatchling
, inflection
, mypy-extensions
, orjson
, peft
, ray
, transformers
, typing-extensions
}:
buildPythonPackage rec {
pname = "openllm-core";
version = "0.2.27";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bentoml";
repo = "OpenLLM";
rev = "refs/tags/v${version}";
hash = "sha256-R69Qsx9360pJx+7oyhHdeAXUjTAdevPmaBl9gj+AA8U=";
};
sourceRoot = "source/openllm-core";
nativeBuildInputs = [
hatch-fancy-pypi-readme
hatch-vcs
hatchling
];
propagatedBuildInputs = [
attrs
bentoml
cattrs
inflection
mypy-extensions
orjson
typing-extensions
];
passthru.optional-dependencies = {
vllm = [
ray
# vllm
];
fine-tune = [
accelerate
bitsandbytes
datasets
peft
transformers
# trl
] ++ transformers.optional-dependencies.torch
++ transformers.optional-dependencies.tokenizers
++ transformers.optional-dependencies.accelerate;
};
# there is no tests
doCheck = false;
pythonImportsCheck = [ "openllm_core" ];
meta = with lib; {
description = "Core components for OpenLLM";
homepage = "https://github.com/bentoml/OpenLLM/tree/main/openllm-core";
changelog = "https://github.com/bentoml/OpenLLM/blob/${src.rev}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ natsukium ];
};
}

View File

@ -4014,6 +4014,8 @@ self: super: with self; {
inherit (pkgs.darwin.apple_sdk.frameworks) ApplicationServices OpenGL;
};
openllm-core = callPackage ../development/python-modules/openllm-core { };
openstep-plist = callPackage ../development/python-modules/openstep-plist { };
glyphslib = callPackage ../development/python-modules/glyphslib { };