# \#machine-learning

**URL:** https://discuss.ocaml.org/tag/machine-learning/187.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [Do we have a reference implementation of transformer in OCaml?](https://discuss.ocaml.org/t/do-we-have-a-reference-implementation-of-transformer-in-ocaml/17735)

<div class="topic-metadata">

**Author:** [@UnixJunkie](https://discuss.ocaml.org/u/UnixJunkie)\
**Replies:** 0\
**Last updated:** [January 24, 2026, 11:39am UTC](https://discuss.ocaml.org/t/do-we-have-a-reference-implementation-of-transformer-in-ocaml/17735 "2026-01-24T11:39:36Z")

</div>

Hello, Do we have a transformer implemented in OCaml somewhere? I guess it would use tensorflow or torch bindings. Citation: Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., … & Polosukhi…

---

## [Coq and Deep Learning Industrial Projects](https://discuss.ocaml.org/t/coq-and-deep-learning-industrial-projects/16287)

<div class="topic-metadata">

**Author:** [@mostafatouny](https://discuss.ocaml.org/u/mostafatouny)\
**Replies:** 4\
**Last updated:** [March 18, 2025, 2:55pm UTC](https://discuss.ocaml.org/t/coq-and-deep-learning-industrial-projects/16287 "2025-03-18T14:55:27Z")

</div>

Hello, This is related to my previous posts: Business models motivating active development in OCaml and OCaml projects utilizing Category theory. A recently curated list, Deep Learning for Theorem Proving, surveys work…

---

## [Toy Autograd Engine in OCaml with Apple Accelerate Backend](https://discuss.ocaml.org/t/toy-autograd-engine-in-ocaml-with-apple-accelerate-backend/15239)

<div class="topic-metadata">

**Author:** [@jewelltaylor](https://discuss.ocaml.org/u/jewelltaylor)\
**Replies:** 2\
**Last updated:** [September 4, 2024, 11:28am UTC](https://discuss.ocaml.org/t/toy-autograd-engine-in-ocaml-with-apple-accelerate-backend/15239 "2024-09-04T11:28:26Z")

</div>

I have been venturing to learn a new language and I landed on OCaml after hearing a few interesting talks from Jane Street. I just made public a toy autograd engine in OCaml with an Apple Accelerate backend if anyone is …

---

## [32-bit native code support for OCaml 5+](https://discuss.ocaml.org/t/32-bit-native-code-support-for-ocaml-5/12583)

<div class="topic-metadata">

**Author:** [@jbeckford](https://discuss.ocaml.org/u/jbeckford)\
**Replies:** 21\
**Last updated:** [July 12, 2023, 3:21am UTC](https://discuss.ocaml.org/t/32-bit-native-code-support-for-ocaml-5/12583 "2023-07-12T03:21:36Z")

</div>

Thanks for summary. The critical piece I see missing in every commentary about OCaml 5 is that 32-bit native compilation was removed. For me and my small 3-person company that means we won’t adopt OCaml 5 for a very lon…

---

## [Stable Diffusion in OCaml](https://discuss.ocaml.org/t/stable-diffusion-in-ocaml/10932)

<div class="topic-metadata">

**Author:** [@Arul](https://discuss.ocaml.org/u/Arul)\
**Replies:** 0\
**Last updated:** [December 8, 2022, 6:08pm UTC](https://discuss.ocaml.org/t/stable-diffusion-in-ocaml/10932 "2022-12-08T18:08:46Z")

</div>

I ported over Stable Diffusion in OCaml as I tried to learn the internals of stable diffusion. So far, it has been a smooth process to run deep learning models in OCaml. ocaml-torch library is pretty neat! Comments/F…

---

## [\[ANN\] release of svmwrap: a wrapper around libsvm-tools](https://discuss.ocaml.org/t/ann-release-of-svmwrap-a-wrapper-around-libsvm-tools/8818)

<div class="topic-metadata">

**Author:** [@UnixJunkie](https://discuss.ocaml.org/u/UnixJunkie)\
**Replies:** 5\
**Last updated:** [November 18, 2021, 3:40pm UTC](https://discuss.ocaml.org/t/ann-release-of-svmwrap-a-wrapper-around-libsvm-tools/8818 "2021-11-18T15:40:08Z")

</div>

Hello, \[this post is not spam, stupid bot, don’t remove it\] I am pleased to announce the availability in opam of the svmwrap package. A wrapper around libsvm’s svm-train and svm-predict executables. Currently, only r…

---

## [\[ANN\] first release of orf: OCaml Random Forests](https://discuss.ocaml.org/t/ann-first-release-of-orf-ocaml-random-forests/8034)

<div class="topic-metadata">

**Author:** [@UnixJunkie](https://discuss.ocaml.org/u/UnixJunkie)\
**Replies:** 0\
**Last updated:** [June 22, 2021, 1:41am UTC](https://discuss.ocaml.org/t/ann-first-release-of-orf-ocaml-random-forests/8034 "2021-06-22T01:41:32Z")

</div>

I finished implementing a classifier and regressor using Random Forests (seminal paper: https://link.springer.com/article/10.1023/A:1010933404324): Some caveats: this is somewhat slow; especially the classifier (a…

---

## [A Random Forests classifier in OCaml](https://discuss.ocaml.org/t/a-random-forests-classifier-in-ocaml/8003)

<div class="topic-metadata">

**Author:** [@UnixJunkie](https://discuss.ocaml.org/u/UnixJunkie)\
**Replies:** 3\
**Last updated:** [June 17, 2021, 12:11pm UTC](https://discuss.ocaml.org/t/a-random-forests-classifier-in-ocaml/8003 "2021-06-17T12:11:37Z")

</div>

Hello, I have started working on a Random Forests implementation in OCaml recently. The classifier is supposed to work now. Some caveats: this is pretty slow (and I don’t know so much how to accelerate it). This …

---

## [OCaml and OCaml libraries for data-oriented applications and data analysis](https://discuss.ocaml.org/t/ocaml-and-ocaml-libraries-for-data-oriented-applications-and-data-analysis/6908)

<div class="topic-metadata">

**Author:** [@yarnton](https://discuss.ocaml.org/u/yarnton)\
**Replies:** 6\
**Last updated:** [December 7, 2020, 10:16pm UTC](https://discuss.ocaml.org/t/ocaml-and-ocaml-libraries-for-data-oriented-applications-and-data-analysis/6908 "2020-12-07T22:16:38Z")

</div>

I have used OCaml sporadically in some hobby projects for more than a decade, and it’s a language I really like. The domain has been mostly compilers and static analyzers. Professionally, I have been in a statistics rol…

---

## [\[ANN\] 1sr release of omlr: Multiple Linear Regression modeling (using R under the carpet)](https://discuss.ocaml.org/t/ann-1sr-release-of-omlr-multiple-linear-regression-modeling-using-r-under-the-carpet/6417)

<div class="topic-metadata">

**Author:** [@UnixJunkie](https://discuss.ocaml.org/u/UnixJunkie)\
**Replies:** 0\
**Last updated:** [September 14, 2020, 8:03am UTC](https://discuss.ocaml.org/t/ann-1sr-release-of-omlr-multiple-linear-regression-modeling-using-r-under-the-carpet/6417 "2020-09-14T08:03:25Z")

</div>

Hello, omlr is now available in opam. # opam info omlr \<\>\<\> omlr: information on all versions \>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\> name omlr all-installed-versions 1.0.2 \[default\] all-versions …

---

## [Scikit-learn for OCaml](https://discuss.ocaml.org/t/scikit-learn-for-ocaml/5536)

<div class="topic-metadata">

**Author:** [@UnixJunkie](https://discuss.ocaml.org/u/UnixJunkie)\
**Replies:** 3\
**Last updated:** [April 17, 2020, 5:48am UTC](https://discuss.ocaml.org/t/scikit-learn-for-ocaml/5536 "2020-04-17T05:48:26Z")

</div>

Ronan Lehy just hacked this: This might interest a significant number of people out there. We are no more condemned to live in a world full of snakes that will bite us at run-time. :smiley:

---

## [\[ANN\] first release of oplsr: an OCaml wrapper to the pls R package - Partial Least Squares (PLS) regression](https://discuss.ocaml.org/t/ann-first-release-of-oplsr-an-ocaml-wrapper-to-the-pls-r-package-partial-least-squares-pls-regression/5293)

<div class="topic-metadata">

**Author:** [@UnixJunkie](https://discuss.ocaml.org/u/UnixJunkie)\
**Replies:** 0\
**Last updated:** [March 10, 2020, 7:00am UTC](https://discuss.ocaml.org/t/ann-first-release-of-oplsr-an-ocaml-wrapper-to-the-pls-r-package-partial-least-squares-pls-regression/5293 "2020-03-10T07:00:48Z")

</div>

Dear OCaml users, It is my great pleasure to release one more hackish wrapper to use some R package from within OCaml: For some background: Cf. test.ml in the sources for a usage example. Happy regression, F.

---

## [For machine-learning people: nlopt-ocaml is quite nice](https://discuss.ocaml.org/t/for-machine-learning-people-nlopt-ocaml-is-quite-nice/3387)

<div class="topic-metadata">

**Author:** [@UnixJunkie](https://discuss.ocaml.org/u/UnixJunkie)\
**Replies:** 0\
**Last updated:** [February 21, 2019, 6:59am UTC](https://discuss.ocaml.org/t/for-machine-learning-people-nlopt-ocaml-is-quite-nice/3387 "2019-02-21T06:59:00Z")

</div>

Hello, This library is a real time-saver when doing parameter optimization for machine learning models (hyper parameter search). Since it can smartly stop an optimization process, it is really faster than doing a g…

---

## [OCaml for Data Science](https://discuss.ocaml.org/t/ocaml-for-data-science/1878)

<div class="topic-metadata">

**Author:** [@egoholic](https://discuss.ocaml.org/u/egoholic)\
**Replies:** 25\
**Last updated:** [May 3, 2018, 3:51pm UTC](https://discuss.ocaml.org/t/ocaml-for-data-science/1878 "2018-05-03T15:51:27Z")

</div>

Hello. Do you use OCaml for data science? - If so - could you please provide a short info about the status of data science in OCaml? I mean: What makes OCaml good/bad for data science (long story short of your experie…

---

## [The poor man's interface to some SVM package in R](https://discuss.ocaml.org/t/the-poor-mans-interface-to-some-svm-package-in-r/1607)

<div class="topic-metadata">

**Author:** [@UnixJunkie](https://discuss.ocaml.org/u/UnixJunkie)\
**Replies:** 0\
**Last updated:** [February 22, 2018, 3:09am UTC](https://discuss.ocaml.org/t/the-poor-mans-interface-to-some-svm-package-in-r/1607 "2018-02-22T03:09:29Z")

</div>

In case other people are interested, here is my fresh hack: I may do the same for other R packages in the near future if the idea proves to be useful enough. This is quite low level, and there is no plan to support …
