char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
45abe0f74
char/aliceai-t5-moe
1{ 2lib , 3stdenv , 4buildPythonPackage , 5poetry-core , 6mkShell , 7python3Packages , 8gguf-py , 9} @inputs: 10 11let 12llama-python-deps = with python3Packages ; [ 13numpy 14sentencepiece 15transformers 16protobuf 17torchWithoutCuda 18gguf-py 19tqdm 20 21# for scripts/compare-llama-bench.py 22gitpython 23tabulate 24 25# for examples/pydantic-models-to-grammar-examples.py 26docstring-parser 27pydantic 28 29]; 30 31llama-python-test-deps = with python3Packages ; [ 32# Server bench 33matplotlib 34 35# server tests 36openai 37pytest 38prometheus-client 39]; 40in 41 42buildPythonPackage ({ 43pname = "llama-scripts" ; 44version = "0.0.0" ; 45pyproject = true ; 46 47# NOTE: The files filtered out here are not visible in the build sandbox, neither 48# do they affect the output hash. They can be modified without triggering a rebuild. 49src = lib . cleanSourceWith { 50filter = 51name: type: 52let 53any = builtins . any ( x: x ); 54baseName = builtins . baseNameOf name ; 55in 56any [ 57( lib . hasSuffix ".py" name ) 58( baseName == "README.md" ) 59( baseName == "pyproject.toml" ) 60]; 61src = lib . cleanSource ../../. ; 62}; 63nativeBuildInputs = [ poetry-core ]; 64nativeCheckInputs = llama-python-test-deps ; 65dependencies = llama-python-deps ; 66})