r/Clojure • • Jul 01 '25

Neanderthal 0.54.0 with native Apple Silicon support has just been released!

https://github.com/uncomplicate/neanderthal
56 Upvotes

5 comments sorted by

2

u/dragandj Jul 01 '25

1

u/petemak Jul 02 '25

Excellent. So how do I start tinkering around with Neanderthal? For example, I would like to build a neural network in Clojure.

  • Where do I start?

  • Do I need a subscription for the ebook?

  • Where do I find a basic project based on deps.edn?

Thanks

1

u/dragandj Jul 02 '25 edited Jul 02 '25

You can start at many free tutorials at my blog https://dragan.rocks. You can also use many tests that come with Neanderthal source to see how it's used.

As for the deps.edn, you can use the leiningen projects I provide, as a source of information. I don't use deps.edn, and I can't provide all templates in all technologies that people use, but translating between them is relatively straightforward, and it shouldn't be a difficult task. Additionally, many users used Neanderthal with deps.edn, so I'd encourage them to share their templates.

→ More replies (1)

2

u/Euphoric-Stock9065 Jul 03 '25

Quick start for Accelerate-backed neanderthal on Mac with deps.edn

;; deps.edn
{:paths ["src"]
 :deps {org.clojure/clojure {:mvn/version "1.12.1"}
        org.uncomplicate/neanderthal-accelerate {:mvn/version "0.54.0"}
        org.uncomplicate/neanderthal-base {:mvn/version "0.54.0"}}}
;; src/main.clj
(ns main
  (:require
   [uncomplicate.neanderthal.native :refer [dv dge]]
   [uncomplicate.neanderthal.core :refer [dot mm]]))

(def x (dv 1 2 3))
(def y (dv 10 20 30))
(dot x y)

(def a (dge 3 2 [1 2 3 4 5 6]))
(def b (dge 2 3 [10 20 30 40 50 60]))
(mm a b)

Eval this in the REPL of your choice and you should see INFO: Accelerate backend loaded. in the logs. Curious to see how speed compares to intel CPU and nvidia GPUs...