No video

Java and AI? - Inside Java Newscast #72

  Рет қаралды 19,332

Java

Java

Күн бұрын

AI development can be split into three categories: developing an ML model (where Java isn't competitive and is unlikely to become top of the class any time soon), developing an AI-centered product (where Java is well-positioned and will become stronger soon; but does this category matter in the long run?) and adding AI-based features to larger projects (where Java is already very good and will only become stronger thanks to Valhalla's value types, Panama's FFM and vector APIs, and Babylon's code reflection).
Chapters
0:00 Intro
1:06 Three Kinds of AI
MKBHD - AI the Product vs AI the Feature: • AI the Product vs AI t...
2:48 AI Features in Java
TornadoVM: www.tornadovm....
ONNX Runtime: onnxruntime.ai/
DJL: djl.ai/
Tribuo: tribuo.org/
LangChain4j: docs.langchain...
Project Valhalla: openjdk.org/pr...
Project Panama: openjdk.org/pr...
vector API: openjdk.org/je...
Project Babylon: openjdk.org/pr...
Babylon and Triton: openjdk.org/pr...
more on data-centric applications: inside.java/20...
6:45 AI Products in Java
7:41 AI Development in Java
9:38 Outro
Tags #Java #OpenJDK #AI

Пікірлер: 50
@victorpinasarnault9135
@victorpinasarnault9135 Ай бұрын
I prefer Java rather than Python because it is concise. Conceptually, it is clearer than Python. Python is confuse regarding OOP.
@silverdemon101
@silverdemon101 Ай бұрын
So nobody knew about Groovy being the Python for the JVM ecosystem? I believe Groovy has a lot of potential in AI and data science.
@NiranjanNanda
@NiranjanNanda Ай бұрын
@@silverdemon101why not kotlin? For that matter any jvm language designed like a scripting language
@silverdemon101
@silverdemon101 Ай бұрын
Groovy has already existed since 2004 way longer than Kotlin and has improved quite a lot in terms of tooling. Go look at Paul King's presentation and you'll understand more.
@whatever-kn9uc
@whatever-kn9uc Ай бұрын
Do you have any documentation that i can refer to learn ai with java
@RickGladwin
@RickGladwin Ай бұрын
Thanks for taking such a measured approach to this topic (as opposed to coming out like a Java-only cheerleader). I respect and trust your information much more because of that. I’m currently a Java developer starting a Masters in AI (mostly Python), so I’m interested to see how the two are integrated over the next couple of years.
@nipafx
@nipafx Ай бұрын
Thank you, Rick! 🧡💙
@SergiuszRoszczyk
@SergiuszRoszczyk Ай бұрын
Visualization tools in Java reminds me my JavaFX 8 project, where you couldn’t assign color to particular colors in own order. There was a bug that the color was assigned to Id and removing and adding new dataset to plot rearranged them in the order of adding. The Id was private and the color was derived from it, so it was pretty annoying to get colors consistent without reaching out to reflection and accessing private properties of adding virtual items and removing them to increase Id to expected color value
@DavidDLee
@DavidDLee Ай бұрын
Project Valhalla is 10 years old. Many of us gave up on it long ago. Project Panama is still in preview or not delivered (vector API) and Babylon does not even have a JEP to follow. In the mean time, Python is gathering momentum which will be difficult to match
@nipafx
@nipafx Ай бұрын
Valhalla is taking a long time, but it's also a deeply invasive change and I think we can agree that siphoning some of the effort into more short-term gains (~> Amber) is a good compromise. Panama finalized the FFM API (in JDK 22) and the vector API is ready for use in production if it's important enough for you that you're willing to rewrite some code. You'Re right on Babylon, but it's just a month old, so... Honestly, I don't think Python is gathering momentum. I think it _has_ momentum but looking over the list of PEPs, I don't see anything groundbreaking (then again, I don't know the ecosystem, so I may very well be missing something) - what's there that compares to the efforts made in Valhalla, Panama, _or_ Babylon, let alone all of OpenJDK combined?
@ingframin
@ingframin Ай бұрын
@@nipafx The strength of Python is interoperability and interactive development. Calling a C DLL from Java is still a miserable experience and jShell is a joke compared to the Python REPL. For academics, AI researchers, and data scientists, it's a lot easier to develop AI models in Python and build up from there. The deployment in production than follows that: why rewrite something that already works? Java is more focused on top down design/development, which is not very suited to experimental research. Once your classes and hierarchies are finalised, it's difficult to change them. The dynamic nature of Python is so much better for this. To be clear: Java is a very good language. But I think it's too deep into the "Enterprise development" model to breach into experimental stuff. It's like the early days of the web: Perl, Ruby, Python, PHP were the kings. Only when the field consolidated a bit, Java and the others gained a substantial foothold. EDIT: One final remark: Valhalla and Panama are the 2 feature sets that would have allowed me to use Java for our new 6G testbed. Now it's all C++ and Python, because those 2 JEPs are late.
@DavidDLee
@DavidDLee Ай бұрын
@@nipafx Python is slow and a Valhalla is not even on their radar. But, even in college they today teach Numpy and many use PyTorch and other libraries that don't exist for Java. Startups that do ML/AI today use Python from the get go, including for the training portion, and they don't need to wait for projects that are not yet available or maybe never will.
@YuanBo63
@YuanBo63 Ай бұрын
I waited for this topic for quite some time😀
@nipafx
@nipafx Ай бұрын
I hope the video delivers. 😊
@jay_sensz
@jay_sensz Ай бұрын
It seems like Babylon and Valhalla won't be enough to make a half float implementation palatable to developers due to the lack of operator overloading. You'd still end up writing code like `hf1.mult(hf2).add(hf3.mult(hf4))` instead of `hf1*hf2 + hf3*hf4` or am I wrong?
@nipafx
@nipafx Ай бұрын
You're right - see 4:51.
@badpotato
@badpotato Ай бұрын
what's wrong with writing like this?
@jay_sensz
@jay_sensz Ай бұрын
@@badpotato It's a lot harder to read
@driveDoses
@driveDoses Ай бұрын
Great video.
@user-ij9vi6sn8g
@user-ij9vi6sn8g Ай бұрын
Other helpful properties you mention are very much important for any data scientist to pick java as their first choice, particularly visualization tools. hopefully amber can do something about it.
@nipafx
@nipafx Ай бұрын
I don't think Amber is the right project for that - it is focused on improving the language to "right-size ceremony", not to provide a better library, let alone JavaFX. I also think it makes sense to focus on where Java is strongest in the AI space and that's definitely AI feature/product development, not model development. Maybe some resources free up in the future and issues like visualization get tackled, but I don't think that'll happen any time soon.
@forKotlinsky
@forKotlinsky Ай бұрын
I prefer Java rather than Python because I am waiting for Valhalla
@CliqueSpace
@CliqueSpace 15 күн бұрын
I wish for a Java that solved the problem of dealing with checked exceptions across libraries.
@Nick-yd3rc
@Nick-yd3rc Ай бұрын
And regarding Nikolai’s list, in my opinion, what’s most important for data science workflows and UX is a perfect data frame library, on par with Pandas, Polars, R data.table, etc., and close in efficiency, also to DuckDB. Easy integrations with SQL databases and Spark. Kotlin also offers a new data frame library, though I can’t tell much to its efficiency and feature parity. There’s a recent JetBrains talk specifically on their DataFrame library. It would be great if the community could focus on just one implementation and make it shine instead of a myriad incomplete, half-baked attempts. In addition, it will be hard to convince data science folks to move over to Java for that kind of work. Spark jobs are mostly for data engineers with some experience in Scala. That doesn’t always immediately translate to actual data science workflows. It might be easier to just run Python workloads by FFI. If that integration becomes truly seamless, 80% of issues will be solved outright.
@farkarf
@farkarf Ай бұрын
Thanks for the video. Q: Why is operator overloading a desired feature in ML/AI? In my experience (c++/scala) operator overloading obfuscates logic. As a colleague used to say, "Operator overloading is syntactic sugar that brings cancer of the semi-colon" 😂
@nipafx
@nipafx Ай бұрын
ML/AI and data science in general is very heavy on arithmetic and doing that with method calls instead of operators is no fun.
@SourabhBhat
@SourabhBhat Ай бұрын
@farkarf Do you have experience working on linear algebra using Java versus any other language with operator overloading? I for one have moved away from Java for this reason. My code with operator overloading looks close to what I write on paper, making it less obfuscated in Python.
@farkarf
@farkarf Ай бұрын
@@SourabhBhat yes, (linear algebra in java). Our team then transitioned to Scala. I think operator overloading is fine for DSLs and such, but more often than not, it obfuscates logic (especially if your team is in the habit of wanton operator overload). Once a language supports a feature, it gets hard to tell others to eschew it. That was circa 2013. Java hardly had any functional support.. what made Scala so attractive to us back then. Re operator overloading and verbosity: most of the interesting stuff happens at higher levels of abstraction.. matrix operations for eg don't need operator representations. Just because we use super-script T to write the transpose of a matrix doesn't mean it should be represented that way in code, imo. If you ask me, Python is convenient, but also, you keep having to look at the mess under its hood, cuz it super obfuscated.
@vinterskugge907
@vinterskugge907 Ай бұрын
8:21 Nice to see an acknowledgement from an Oracle employee of the downsides of checked exceptions. Any chance of Project Amber developing an opt-out feature for checked exceptions?
@nipafx
@nipafx Ай бұрын
There's a long way from "a feature has downsides under certain circumstances" to "there'll be a feature flag", so I wouldn't hold my breath on that one. Then again, it's not _just_ beginners that struggle with it, so maybe something will get done. Personally, I think the better solution would be variadic generics (at least for exception types), so functional APIs can work better with checked exceptions.
@sjzara
@sjzara Ай бұрын
There are also great benefits to checked exceptions, especially when security and stability is important.
@alcar32sharif
@alcar32sharif Ай бұрын
I am a Java Fanboy and I admit that Java lacks essential features to be effectively useful in AI/ ML/Datascience projects. Doing matrix or tensor operations in Java is extremely hard and painful. Working with high dimensional data as well.
@quintesse
@quintesse Ай бұрын
Wait "maybe operator overloading"? WHere can I read about that, I googled for it but couldn't find anything :-)
@nipafx
@nipafx Ай бұрын
You forgot two "maybe"s there. 😉There were some Ask the Architect sessions at past conferences (somewhere in this list: kzfaq.info/sun/PL_-IO8LOLuNrVRv3eEVGk8LhH8PiEirnp ) where Brian mentioned that once value types and universal generics are done, this could be looked into. But that's very speculative and AFAIK not written down anywhere.
@quintesse
@quintesse Ай бұрын
@@nipafx no no Brian can't talk about ideas without writing them down! 😛 (NB: the link doesn't seem to work for me, it just takes me to a generic KZfaq page)
@nipafx
@nipafx Ай бұрын
@@quintesse 😂 (KZfaq included the closing parentheses in the URL. Fixed now.)
@user-md2fk3jj1e
@user-md2fk3jj1e Ай бұрын
worth to mention 'mukel/llama3.java', a java implementation of llama.cpp, that work's only 10-20% of pure c implementation.
@andriespretorius5534
@andriespretorius5534 14 күн бұрын
M$ use to make videos like this all the time... java ecosystem has got a real problem it needs to resolve asap
@VuLinhAssassin
@VuLinhAssassin Ай бұрын
I can't wait for another ten years before all projects are made reality 💀
@nipafx
@nipafx Ай бұрын
Come on, that's not fair. Babylon is just a year old and Panama already delivered FFM and (basically) the vector API. But, yeah, Valhalla is taking its time.
@VuLinhAssassin
@VuLinhAssassin Ай бұрын
@@nipafx Valhalla was a bit too ambitious, I guess.
@nipafx
@nipafx Ай бұрын
@@VuLinhAssassin It's definitely ambitious, but I don't think _too_ ambitious. Work on it is progressing and I'm convinced we'll see results eventually.
@andreadelbene730
@andreadelbene730 Ай бұрын
Unlike c-like languages Python support tuples and multiple return values, that's why it fits better AI code. There's no magic behind this.
@sjzara
@sjzara Ай бұрын
Java can return multiple return values in records.
@rtorello75
@rtorello75 Ай бұрын
This topic, in my opinion, is becoming the next run-a-way "Hype Train" of the USA (bigger than a "Pet Rock" from the 1970's). I have used ChatGPT, and it clearly does some pretty amazing things in its ability to speak grammatically correct English. In fact, in my wildest dreams, I never thought I'd be able to ask programming questions about Java, and have code shot back out at me by AI! However, ChatGPT's models took months to train and it has been said multi-millions of dollars of hardware. When Nicolai says "Java can do AI", it sounds like an extremely over-simplified statement to me. What part of A.I. is Java going to do? Right now I could write a Java-based App to communicate with Open-AI's system and ask it questions, right? Open-AI didn't even use GPU's, they used something called TPU's, and they are very expensive. Project Panama's Vector-API is supposed to be something that allows for programming GPU's, correct? It seems to me like a series of hour-long videos from expert programmers about this topic would be the right attitude.
@PeterVerhas
@PeterVerhas Ай бұрын
Is Java good for SQL databases? No. Do we care? No. Why would I want the AI engine written in Java? AI services like embedding, vector db, and llm are services I can quickly call from Java.
@nipafx
@nipafx Ай бұрын
An SQL database is a separate service that is set up for remote communication - an AI engine isn't. You can build such a service around it but why go through the trouble if you don't have to? With AI engines in Java you get better observability and debugging, seamless integration, uniform resource management, etc.
@Denimy0
@Denimy0 Ай бұрын
Why wouldnt Java be good for SQL db’s? Wierdest take i’ve heard.
Это реально работает?!
00:33
БРУНО
Рет қаралды 4,3 МЛН
哈莉奎因以为小丑不爱她了#joker #cosplay #Harriet Quinn
00:22
佐助与鸣人
Рет қаралды 10 МЛН
Linus Torvalds: Speaks on Hype and the Future of AI
9:02
SavvyNik
Рет қаралды 150 М.
What is the Java Job delusion?
12:23
Stefan Mischook
Рет қаралды 114 М.
This AI Agent with RAG Manages MY LIFE
10:52
Cole Medin
Рет қаралды 10 М.
(Dirty?) Tricks in Java 22 - Inside Java Newscast #64
13:05
Java 22 ... and beyond | Brian Goetz (Oracle)
43:05
JAX TV
Рет қаралды 5 М.
If Your Code Looks Like This... You're A GOOD Programmer
16:39
Continuous Delivery
Рет қаралды 55 М.
Modern Java in Action
50:32
Java
Рет қаралды 36 М.
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Dylan Beattie
Рет қаралды 137 М.