summaryrefslogtreecommitdiff
path: root/Biz/Bild/Deps/lion-pytorch.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2023-08-07 17:57:42 -0400
committerBen Sima <ben@bsima.me>2023-08-07 18:02:13 -0400
commit44b1f8d5bc2ffcb00f56b0096476501e7e0cd458 (patch)
treed005a849d15fe8ef59ed7523b7997d6529020125 /Biz/Bild/Deps/lion-pytorch.nix
parentedb55ff54b9f81c0942f4120eedd72357d7b3d7c (diff)
Get ava.py running with nixified builds
I had to redo some of my python overrides and crib the bitsandbytes.nix from upstream. Ava is failing because: ValueError: Tokenizer class LlamaTokenizer does not exist or is not currently imported. I think this means I need to update my nixpkgs pin, so I'm gonna snapshot my work in git, do the update, and that might obviate the local bitsandbytes.nix anyway.
Diffstat (limited to 'Biz/Bild/Deps/lion-pytorch.nix')
-rw-r--r--Biz/Bild/Deps/lion-pytorch.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/Biz/Bild/Deps/lion-pytorch.nix b/Biz/Bild/Deps/lion-pytorch.nix
new file mode 100644
index 0000000..e23011a
--- /dev/null
+++ b/Biz/Bild/Deps/lion-pytorch.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, torch
+}:
+
+buildPythonPackage rec {
+ pname = "lion-pytorch";
+ version = "0.1.2";
+ format = "setuptools";
+ disabled = pythonOlder "3.6";
+
+ src = fetchFromGitHub {
+ owner = "lucidrains";
+ repo = "lion-pytorch";
+ rev = "refs/tags/${version}";
+ hash = "sha256-9hdpRJvCpv3PeC7f0IXpHt6i+e6LiT0QUl5jeDGelQE=";
+ };
+
+ propagatedBuildInputs = [ torch ];
+
+ pythonImportsCheck = [ "lion_pytorch" ];
+ doCheck = false; # no tests currently
+
+ meta = with lib; {
+ description = "Optimizer tuned by Google Brain using genetic algorithms";
+ homepage = "https://github.com/lucidrains/lion-pytorch";
+ license = licenses.mit;
+ maintainers = with maintainers; [ bcdarwin ];
+ };
+}