# Has Julia met your need for AI and ML?

**URL:** https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818
**Category:** New to Julia
**Created:** [September 24, 2024, 4:44pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818 "2024-09-24T16:44:11Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![hack3rcon](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)
#### Post date: [September 24, 2024, 4:44pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/1 "2024-09-24T16:44:12Z")

</div>

Hello,  
Has Julia met your AI and ML needs? I mean, have you ever regretted choosing Julia when doing AI and ML projects?

Thank you.

---

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [September 24, 2024, 4:45pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/2 "2024-09-24T16:45:28Z")

</div>

no

---

<div class="post-metadata">

### Author: ![adienes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adienes/32/37459_2.png) [@adienes](https://discourse.julialang.org/u/adienes)
#### Post date: [September 24, 2024, 4:47pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/3 "2024-09-24T16:47:09Z")

</div>

it didn’t, but then I submitted a PR and now it does

---

<div class="post-metadata">

### Author: ![hack3rcon](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)
#### Post date: [September 24, 2024, 4:38pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/4 "2024-09-24T16:38:05Z")

</div>

Hi,  
Thank you so much gor your reply  
Why Python is still mainstream for most AI? Why did you choose Julia?

---

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [September 24, 2024, 5:11pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/5 "2024-09-24T17:11:09Z")

</div>

The reason Python is used, is because it’s a good interface to high-speed code written in other fast languages. Julia can also be a good interface, and that faster language. Training massive AI/ML models relies on libraries like Microsoft’s DeepSpeed (“[Python 69.0%](https://github.com/microsoft/DeepSpeed/search?l=python) [C++ 20.3%](https://github.com/microsoft/DeepSpeed/search?l=c%2B%2B)[Cuda 9.8%](https://github.com/microsoft/DeepSpeed/search?l=cuda)”, Julia could theoretically have replaced all the languages, the numbers are for source code, for runtime about 0% is Python), for distributed training, this is only of interest to big companies that can afford to do massive training of AI models costing millions of dollars.

AI is divided into many subfields, Machine learning (ML), natural language processing (NLP), neural networks/deep learning, and large-language models (LLMs) (what I had in mind for mainstream, fuelling so called chatbots like ChatGPT), text-to-image or video models (like LLMs based on transformer models), computer-vision, reinforcement learning, chess and poker playing AI etc.

Mainstream AI is transformer models, a type of machine learning application. The mainstream is already going to Mamba and other variants, and transformer models are being upgraded to KAN-based:

> **[Kolmogorov-Arnold Transformer](https://arxiv.org/abs/2409.10594)**
>
> Transformers stand as the cornerstone of mordern deep learning. Traditionally, these models rely on multi-layer perceptron (MLP) layers to mix the information between channels. In this paper, we introduce the Kolmogorov-Arnold Transformer (KAT), a...

From yesterday:

> **[TransUKAN:Computing-Efficient Hybrid KAN-Transformer for Enhanced Medical...](https://arxiv.org/abs/2409.14676)**
>
> U-Net is currently the most widely used architecture for medical image segmentation. Benefiting from its unique encoder-decoder architecture and skip connections, it can effectively extract features from input images to segment target regions. The...

> **[Training a KANFormer: KAN's Are All You Need?](https://wandb.ai/byyoung3/mlnews2/reports/Training-a-KANFormer-KAN-s-Are-All-You-Need---Vmlldzo3ODY3ODUz)**
>
> We will dive into a new experimental architecture, replacing the MLP layers in transformers with KAN layers! . Made by Brett Young using Weights & Biases

> **[GitHub - chenziwenhaoshuai/Vision-KAN: KAN for Vision Transformer](https://github.com/chenziwenhaoshuai/Vision-KAN)**
>
> KAN for Vision Transformer

While you already see KAN in “100.0% Python”, that’s sort of white lie, if you look at the dependencies “the requirements.txt” file, i.e. the heavy lifting is always done by non-Python, faster languages like C, or increasingly Julia.

If you’re a user of any of the AI models, or code, then Python is a good option, if you want to develop future best AI, then Julia is the best option.

For beginners I recommend this book (written by then 15-year old genius):

> **[Tanmay Teaches Julia for Beginners: A Springboard to Machine Learning for All...](https://www.amazon.com/Tanmay-Teaches-Julia-Beginners-Springboard/dp/1260456633)**
>
> Tanmay Teaches Julia for Beginners: A Springboard to Machine Learning for All Ages \[Bakshi, Tanmay\] on Amazon.com. \*FREE\* shipping on qualifying offers. Tanmay Teaches Julia for Beginners: A Springboard to Machine Learning for All Ages

I bought it, and this one also seems good:

> **[Julia for Machine Learning: 9781634628136: Computer Science Books @ Amazon.com](https://www.amazon.com/Julia-Machine-Learning-Zacharias-Voulgaris/dp/1634628136)**
>
> Julia for Machine Learning: 9781634628136: Computer Science Books @ Amazon.com

---

<div class="post-metadata">

### Author: ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)
#### Post date: [September 24, 2024, 5:13pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/6 "2024-09-24T17:13:00Z")

</div>

“AI and ML” is such a broad topic that it’s impossible to answer this.

What kinds of tasks do you want to do?

---

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [September 24, 2024, 5:17pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/7 "2024-09-24T17:17:32Z")

</div>

> [@hack3rcon](#):
>
> Has Julia met your AI and ML needs?

I’ll ask back, what are your AI (or ML) “needs”? Do you want to use AI, or develop AI? Either way you can use Julia, especially for _developing_ AI. You are never paining yourself in a corner by learning Julia, even if you abandon Julia it will help you understand e.g. Python. That said the reverse is also true for learning Python or other languages.

---

<div class="post-metadata">

### Author: ![hack3rcon](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)
#### Post date: [September 24, 2024, 5:27pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/8 "2024-09-24T17:27:51Z")

</div>

Hi,  
Thank you so much for your reply.  
So it has covered all your needs. What project have you done with Julia?

---

<div class="post-metadata">

### Author: ![hack3rcon](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)
#### Post date: [September 24, 2024, 5:30pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/9 "2024-09-24T17:30:59Z")

</div>

Hi,  
Thank you so much.  
So you don’t need to use other languages. What was your project?

---

<div class="post-metadata">

### Author: ![hack3rcon](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)
#### Post date: [September 24, 2024, 5:34pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/10 "2024-09-24T17:34:09Z")

</div>

Hi,  
Thank you so much for your reply.  
I want to learn AI programming and then define a project. I am a newbie.

---

<div class="post-metadata">

### Author: ![hack3rcon](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)
#### Post date: [September 24, 2024, 5:38pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/11 "2024-09-24T17:38:58Z")

</div>

Hello,  
Thank you so much for your reply.  
At first, I just want to use AI, but maybe in the future I will think about its development.

---

<div class="post-metadata">

### Author: ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)
#### Post date: [September 24, 2024, 6:33pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/12 "2024-09-24T18:33:38Z")

</div>

I have never regretted using julia but I also knew why I chose it when I did. As a rule of thumb: if you’re doing semi standard deep learning, even research thereof I would pick Jax or pytorch in Python. If you have more esoteric needs then julia is awesome as it can be quite performant without the need to commit to a given ecosystem like Jax or pytorch. It’s grossly over simplified of course but it’s a good rule of thumb. 😊

---

<div class="post-metadata">

### Author: ![hack3rcon](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)
#### Post date: [September 24, 2024, 7:15pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/13 "2024-09-24T19:15:12Z")

</div>

Hi,  
Thank you so much for your reply.  
Why doesn’t Julia have something like Jax or pytorch? Can you call Jax or pytorch in Julia?

---

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [September 25, 2024, 7:26am UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/14 "2024-09-25T07:26:03Z")

</div>

My super short answer was a bit ironic, because as many have said in this thread your question is so general, the topic is so broad, that most answers would be useless.

I would say that it is “hard” to regret using Julia, as you know from the beginning you are using something that is not (yet) mainstream.  
Personally, I started ML with a MITx course that was using Python, but was (luckly) mostly theoretical, so I converted most of the approaches to Julia, [created a package](https://github.com/sylvaticus/BetaML.jl), and I am adding stuff to it as my needs arise.

---

<div class="post-metadata">

### Author: ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)
#### Post date: [September 25, 2024, 11:22am UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/15 "2024-09-25T11:22:05Z")

</div>

1. Julia is an open ecosystem which means most of our ML frameworks are just AbstractArrays while in Jax and pytorch you have a special tensor class you need to use. This means that what they have to be able to differentiate is substantially reduced. Thus, more optimizations are possible and a bit easier to maintain.
2. You can call it from julia for sure but I don’t know if I would recommend programming that way.

---

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [September 25, 2024, 1:01pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/16 "2024-09-25T13:01:29Z")

</div>

> [@DoktorMike](#):
>
> most of our ML frameworks are just AbstractArrays

yeah true if it isn’t buggy which requires a lot of investment. I kinda gave up on Flux.jl as it had too many rough edges and bugs. PyTorch works fine for me.

---

<div class="post-metadata">

### Author: ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)
#### Post date: [September 25, 2024, 1:24pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/17 "2024-09-25T13:24:08Z")

</div>

Agreed, Flux is of course not as battle tested as pytorch.

---

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [September 25, 2024, 2:13pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/18 "2024-09-25T14:13:21Z")

</div>

> [@xiaodai](#):
>
> I kinda gave up on [Flux.jl](https://juliahub.com/ui/Packages/General/Flux) as it had too many rough edges and bugs. PyTorch works fine for me.

I don’t recall the difference between Flux and Lux, but is Lux better, i.e. less buggy (or not at all…), and is it closer to PyTorch? And to you just use PyTorch, from Python, or do you mean from Julia? Which of Julia packages are most like PyTorch? Or like PyTorch Lightning? Or are they more comparable to Tensoflow of JAX?

I only noticed [GitHub - SciML/juliatorch: Convert Julia functions to PyTorch autograd functions](https://github.com/SciML/juliatorch) today, but knew of [GitHub - FluxML/Torch.jl: Sensible extensions for exposing torch in Julia.](https://github.com/FluxML/Torch.jl) and would either work well for you?

---

<div class="post-metadata">

### Author: ![hack3rcon](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@hack3rcon](https://discourse.julialang.org/u/hack3rcon)
#### Post date: [September 25, 2024, 7:48pm UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/19 "2024-09-25T19:48:07Z")

</div>

Hello,  
So, did you use Python?

---

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [September 26, 2024, 11:02am UTC](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818/20 "2024-09-26T11:02:55Z")

</div>

I do use python and PyTorch.

[Next page](https://discourse.julialang.org/t/has-julia-met-your-need-for-ai-and-ml/119818.md?page=2)
