python310Packages.openllm-core: init at 0.2.27
This commit is contained in:
84
pkgs/development/python-modules/openllm-core/default.nix
Normal file
84
pkgs/development/python-modules/openllm-core/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -4014,6 +4014,8 @@ self: super: with self; {
|
|||||||
inherit (pkgs.darwin.apple_sdk.frameworks) ApplicationServices OpenGL;
|
inherit (pkgs.darwin.apple_sdk.frameworks) ApplicationServices OpenGL;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
openllm-core = callPackage ../development/python-modules/openllm-core { };
|
||||||
|
|
||||||
openstep-plist = callPackage ../development/python-modules/openstep-plist { };
|
openstep-plist = callPackage ../development/python-modules/openstep-plist { };
|
||||||
|
|
||||||
glyphslib = callPackage ../development/python-modules/glyphslib { };
|
glyphslib = callPackage ../development/python-modules/glyphslib { };
|
||||||
|
|||||||
Reference in New Issue
Block a user