unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 73266@debbugs.gnu.org
Cc: ngraves@ngraves.fr
Subject: [bug#73266] [PATCH 7/9] gnu: Add python-curated-transformers.
Date: Sun, 15 Sep 2024 10:57:12 +0200	[thread overview]
Message-ID: <20240915085720.13323-7-ngraves@ngraves.fr> (raw)
In-Reply-To: <20240915085720.13323-1-ngraves@ngraves.fr>

* gnu/packages/machine-learning.scm (python-curated-transformers): New variable.

Change-Id: I42cf780097456f5a8a9a9efc2a56e2c082d2a938
---
 gnu/packages/machine-learning.scm | 55 +++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 89fcd3c1b7..d1b282fea8 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -2480,6 +2480,61 @@ (define-public python-cutlery
 @end itemize")
     (license license:expat)))
 
+(define-public python-curated-transformers
+  (package
+    (name "python-curated-transformers")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "curated-transformers" version))
+       (sha256
+        (base32 "04k54r5cxjl3l7xs4kx4cfnqsjr7gdlr577sp7sl7qgrk3kfqjbm"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      '(list  ; Most ignored tests require network.
+        "--ignore=curated_transformers/tests/tokenizers/test_auto_tokenizer.py"
+        "-k" (string-append "not test_special_pieces"
+                            " and not test_auto_encoder"
+                            " and not test_auto_decoder"
+                            " and not test_auto_causal_lm"
+                            " and not test_from_hf_hub_to_cache"
+                            " and not test_from_hf_hub_to_cache_legacy"
+                            " and not test_checkpoint_type_without_safetensors"
+                            " and not test_hf_hub_failures"
+                            ;; These have been added when downgrading curated_tokenizers.
+                            " and not test_camembert_tokenizer_toy_tokenizer"
+                            " and not test_roberta_tokenizer"
+                            " and not test_xlmr_toy_tokenizer"))))
+    (propagated-inputs (list python-catalogue
+                             python-cutlery
+                             python-huggingface-hub
+                             python-pytorch
+                             python-tokenizers))
+    (native-inputs (list python-pytest))
+    (home-page "https://github.com/explosion/curated-transformers")
+    (synopsis "PyTorch library of transformer models and components")
+    (description
+     "This package provides a @code{PyTorch} library of transformer models and
+components.  It helps to download state-of-the-art models that are composed
+from a set of reusable components.  The stand-out features of Curated
+Transformer are:
+
+@itemize
+@item Supports state-of-the art transformer models, including LLMs such as
+Falcon, Llama, and Dolly v2.
+@item Each model is composed from a set of reusable building blocks, providing
+many benefits: implementing a feature or bugfix benefits all models ; Adding
+new models to the library is low-effort.
+@item Consistent type annotations of all public APIs, hence a great coding
+support from IDEs.  Integrates well with your existing type-checked code.
+@item Great for education, because the building blocks are easy to study.
+@item Minimal dependencies.
+@end itemize")
+    (license license:expat)))
+
 (define-public python-autograd
   (let* ((commit "c6d81ce7eede6db801d4e9a92b27ec5d409d0eab")
          (revision "0")
-- 
2.46.0





  parent reply	other threads:[~2024-09-15  9:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-15  8:11 [bug#73266] [PATCH 0/9] Add python-spacy-curated-transformers Nicolas Graves via Guix-patches via
2024-09-15  8:57 ` [bug#73266] [PATCH 1/9] gnu: Add python-azure-storage-file-datalake Nicolas Graves via Guix-patches via
2024-09-15  8:57   ` [bug#73266] [PATCH 2/9] gnu: Add python-cloudpathlib Nicolas Graves via Guix-patches via
2024-09-15  8:57   ` [bug#73266] [PATCH 3/9] gnu: Add python-weasel Nicolas Graves via Guix-patches via
2024-09-15  8:57   ` [bug#73266] [PATCH 4/9] gnu: python-thinc: Update to 8.2.2 Nicolas Graves via Guix-patches via
2024-09-15  8:57   ` [bug#73266] [PATCH 5/9] gnu: python-spacy: Update to 3.7.5 Nicolas Graves via Guix-patches via
2024-09-15  8:57   ` [bug#73266] [PATCH 6/9] gnu: Add python-cutlery Nicolas Graves via Guix-patches via
2024-09-15  8:57   ` Nicolas Graves via Guix-patches via [this message]
2024-09-15  8:57   ` [bug#73266] [PATCH 8/9] gnu: Add python-curated-tokenizers Nicolas Graves via Guix-patches via
2024-09-15  8:57   ` [bug#73266] [PATCH 9/9] gnu: Add python-spacy-curated-transformers Nicolas Graves via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240915085720.13323-7-ngraves@ngraves.fr \
    --to=guix-patches@gnu.org \
    --cc=73266@debbugs.gnu.org \
    --cc=ngraves@ngraves.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).