CoolFace
Modelpublic

Felipe97/llama-cpp-compiled

sourceHugging Faceupdated 4d agoView on Hugging Face
0likes1.1kdownloads
python-scripts.nix67 linesDownload Raw Back to nix
1{2  lib,3  stdenv,4  buildPythonPackage,5  poetry-core,6  mkShell,7  python3Packages,8  gguf-py,9}@inputs:10 11let12  llama-python-deps = with python3Packages; [13    numpy14    sentencepiece15    transformers16    protobuf17    torchWithoutCuda18    gguf-py19    tqdm20 21    # for scripts/compare-llama-bench.py22    gitpython23    tabulate24 25    # for examples/pydantic-models-to-grammar-examples.py26    docstring-parser27    pydantic28 29  ];30 31  llama-python-test-deps = with python3Packages; [32    # Server bench33    matplotlib34 35    # server tests36    openai37    pytest38    prometheus-client39  ];40in41 42buildPythonPackage ({43  pname = "llama-scripts";44  version = "0.0.0";45  pyproject = true;46 47  # NOTE: The files filtered out here are not visible in the build sandbox, neither48  # do they affect the output hash. They can be modified without triggering a rebuild.49  src = lib.cleanSourceWith {50    filter =51      name: type:52      let53        any = builtins.any (x: x);54        baseName = builtins.baseNameOf name;55      in56      any [57        (lib.hasSuffix ".py" name)58        (baseName == "README.md")59        (baseName == "pyproject.toml")60      ];61    src = lib.cleanSource ../../.;62  };63  nativeBuildInputs = [ poetry-core ];64  nativeCheckInputs = llama-python-test-deps;65  dependencies = llama-python-deps;66})67