From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UPcJBPMZ2mSjbgAASxT56A (envelope-from ) for ; Mon, 14 Aug 2023 14:11:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CMTVA/MZ2mSWVwAAauVa8A (envelope-from ) for ; Mon, 14 Aug 2023 14:11:31 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B5AAD4D815 for ; Mon, 14 Aug 2023 14:11:25 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=PoazEX16; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692015086; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fqBf5zmpEZ7ZItkdWqKBv4sLpegBXgtSKQu5kiaOuHY=; b=WQI1rG3LMRtitwXYL6KqtFyEXiEtuLuWyZRgFSlaDA1OfG8gJKKlaPdkhUPiPTaf998z7U McZBeXe9z6iPqgksxyH3rBzwSQdm3FFfjU9+NLpcxwW8M4cDuzfOngIATxlFGFcgPuevwD frWbSyDuRrDAnUFKAkGQqph7oUYZt7s7JwDRwZyyiO7u+VhcRlaoSi7jm0pmsFdycGi5qM gFj0WLaFNKIYxuKr2VDRNpqCgXCli2mto+TyVJV6+JZhbCJHmrEuUn67LqhiHI7CJNUTKm cFzJkaba+wD48CD7hLftYBKIA354vifoAjaj7ZzD4iRPL4y7Pc46Neo6+ARcuQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=PoazEX16; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692015086; a=rsa-sha256; cv=none; b=XmxPbesjc7tV6sJPqC5a+qxTrVPnPQIW6zq+NWN+/909wdL3q4Rys2oSw6bdCwuYnKze2b Y+SdhPdgwg3GZfPK/hcuPzO0iV/aN/a/ZeAIJwK6ngPdjV6/WNA2CpwwWv7EMY/yO2Vfcc 94QdYSpUFDeZxQvsxqXKL8KXVJE5oiYtLHK3uMsBH/RkIA5GkiqtR/qq9RiUQG8RIG/7ss KLxTw7fY/hRgUT2XyE7b+ARJPXybtsLR2bvLYfCWqs7YjvmR/M5rOb+tgZUk5QrYWBEeX/ qHsCsUMfDtDtHv33XVXn9Y5CaZAyzy03p9RGY9dPEmv5dM8IiBpwk+QqCjADOQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVWPa-00036R-RU; Mon, 14 Aug 2023 08:11:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVWPW-00031f-Sd for guix-patches@gnu.org; Mon, 14 Aug 2023 08:11:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qVWPW-00064A-HL for guix-patches@gnu.org; Mon, 14 Aug 2023 08:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qVWPW-0000KZ-Bq for guix-patches@gnu.org; Mon, 14 Aug 2023 08:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65287] [PATCH] gnu: Add gpt4all-backend Resent-From: Andy Tai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Aug 2023 12:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65287 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65287@debbugs.gnu.org Cc: Andy Tai X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16920150111017 (code B ref -1); Mon, 14 Aug 2023 12:11:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Aug 2023 12:10:11 +0000 Received: from localhost ([127.0.0.1]:33093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVWOg-0000GL-Jv for submit@debbugs.gnu.org; Mon, 14 Aug 2023 08:10:10 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVWOe-0000FB-Sc for submit@debbugs.gnu.org; Mon, 14 Aug 2023 08:10:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVWOS-0002f9-4T for guix-patches@gnu.org; Mon, 14 Aug 2023 08:09:57 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qVWOQ-0005Vi-6c for guix-patches@gnu.org; Mon, 14 Aug 2023 08:09:55 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-686f1240a22so4275237b3a.0 for ; Mon, 14 Aug 2023 05:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692014992; x=1692619792; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=fqBf5zmpEZ7ZItkdWqKBv4sLpegBXgtSKQu5kiaOuHY=; b=PoazEX167f3645dA8gOgS9zdvt99MTtLSDB6BGkFQv2LoQsp//xwGFvTogKg5Ri67e Hgoyld0Jmja/AXCpqxoWbS0N2KThW7n5Vcia1bHvv0z69ZmG4ydtnD692P2ig+hNGjT0 kBaVoAl3ATf5yMx9IrMW+rmkhJczLSBtFQa5m4Qrvlu+ZZ8ouaAIj84c9KLHZIy45JVy 1KJyUP7QVe3qCgR0MBbiTT5SdoPBWEiZTXski6XBJs/UUstZivvc4XYJGEodcoEXr+DZ nUw5OpzxUV/52DwoTAC8vjgAyuP9QCZdpGDkfcKX0/O5T9+BOk7XVEZ+7QooQEfjlMi9 vX5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692014992; x=1692619792; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fqBf5zmpEZ7ZItkdWqKBv4sLpegBXgtSKQu5kiaOuHY=; b=Slh3uO1gB0LdrdFepz/6Qwq6IVS4dTZnQZIMHakOG149Eb3LAFQ4kcXsiAkv5014/U Hn1w6dFTWODlzJ+o2ILw+moYnTcFFXfI8WaQcjGDW16xMawJ7PhOzpAUHr4F+z/KFPCw PED+dXH3lbIdUDb4rnc1w6ZQRVGQqKx1rpoOJkOILG/yT13i51Cdf84k5JcnVmfJxZ8x tvaLthgYBwXqdvwR6uweJAtbhNOFC2cTaXJZLEd+oxMKx499iJJHc2N0PXOOcd0tYQSV HPWDOJUcHFIDbDZt3va5wV+xYldeB7B5qOZlyYFH3H5XxXFmvE3MtawU0ObvwGQX/HN1 87Vw== X-Gm-Message-State: AOJu0YweWqFRW7vPXT1dz2Dj3B5k31D1Fd42f+CSsye8HAm2aPkqeXmp rTJYsZ7OPYPwzYu8NrW2Mi7uh+ixDEhO2A== X-Google-Smtp-Source: AGHT+IH4qKXAkS/OKeOHeETs94RmXdBukOhyJEAzUfyoMLWnoiRVtxnxGiyD6uOD9O46LoKK4HztbQ== X-Received: by 2002:a17:90b:1884:b0:263:311f:9bcc with SMTP id mn4-20020a17090b188400b00263311f9bccmr7413363pjb.35.1692014991825; Mon, 14 Aug 2023 05:09:51 -0700 (PDT) Received: from localhost.localdomain ([98.37.226.98]) by smtp.googlemail.com with ESMTPSA id p14-20020a17090adf8e00b0026971450601sm7887604pjv.7.2023.08.14.05.09.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 05:09:51 -0700 (PDT) From: Andy Tai Date: Mon, 14 Aug 2023 05:09:47 -0700 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=lichengtai@gmail.com; helo=mail-pf1-x436.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -0.69 X-Migadu-Queue-Id: B5AAD4D815 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -0.69 X-TUID: wvwfX2O0picp * gnu/packages/machine-learning.scm (gpt4all-backend): New variable --- gnu/packages/machine-learning.scm | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index c32180615b..4c9d56fbe2 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4801,3 +4801,54 @@ (define-public oneapi-dnnl "OneAPI Deep Neural Network Library (oneDNN) is a cross-platform performance library of basic building blocks for deep learning applications.") (license license:asl2.0))) + + +(define-public gpt4all-backend + (let ((commit "108d950874e457ced4d5d1f0569dfb43bbd25734") + (version "0.3.0") + (revision "1")) + (package + (name "gpt4all-backend") + (version (git-version version revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nomic-ai/gpt4all") + (commit commit) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1x2w3x5abqkwjp043ijqfsmsm72783a245y5bri9bs1cpfyr0xyr")))) + (build-system cmake-build-system) + ;; (inputs (list llama-cpp)) + ;; TODO: when upstream supports using system installed llama-cpp, use it + (outputs '("out")) + (arguments + (list #:tests? #f ;no test target + #:configure-flags #~(list (string-append + "-DCMAKE_INSTALL_PREFIX=" + #$output)) + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "gpt4all-backend"))) + (add-after 'chdir 'fix-install-path + (lambda _ + (substitute* "CMakeLists.txt" + (("CMAKE_INSTALL_PREFIX") + "CMAKE_INSTALL_PREFIX_ignored")))) + (replace 'install + (lambda _ + (mkdir-p #$output) + (invoke "cmake" "-P" "cmake_install.cmake")))))) + (home-page "https://gpt4all.io/index.html") + (synopsis "C/C model backend used by GPT4All for inference on the CPU") + (description + "GPT4All backend acts as a universal library/wrapper for all models that +the GPT4All ecosystem supports. Language bindings are built on top of this universal +library. The native GPT4all Chat application directly uses this library for all +inference.") + (license license:expat)))) + + base-commit: b15381460ed74e72792ff182dd2ca7a06ba59b0c -- 2.41.0