← all repositories
haifengl/smile

A full-stack ML engine that refuses to leave the JVM

To keep machine learning—from LLaMA-3 inference to random forests—entirely inside the JVM ecosystem.

6.4k stars Java ML FrameworksLanguage Models
smile
Not currently ranked — collecting fresh signals.
star history

What it does

SMILE is a sprawling machine learning framework for Java, Scala, and Kotlin that bundles classical algorithms, deep learning, LLM inference, NLP, and visualization into a single JVM-native stack. It covers classification, regression, clustering, manifold learning, and sequence models, then adds a LibTorch-backed deep-learning module, an OpenAI-compatible REST server for LLaMA-3 chat, Swing and Vega-Lite plotting, and even a desktop notebook IDE. Think of it as an attempt to build a self-contained data-science universe that happens to run on the JVM.

The interesting bit

Most JVM ML libraries pick a lane—either classic stats or a thin wrapper around Python tensors. SMILE goes the other direction, implementing its own nearest-neighbor trees, wavelet transforms, and BFGS optimizers in base, while the deep module talks directly to LibTorch for GPU tensors and ships a full LLaMA-3 tokenizer, generator, and streaming chat server. It is the rare project that treats the JVM as a first-class citizen for modern AI rather than a host for foreign bindings.

Key highlights

  • Covers the full ML spectrum from SVMs and Gaussian Processes to LLaMA-3 inference and EfficientNet-V2 image classification.
  • Provides idiomatic APIs for Java, Scala, and Kotlin, plus a Quarkus-based OpenAI-compatible REST server with SSE streaming.
  • Includes a built-in DataFrame API, R-style formula language, and I/O for CSV, Parquet, Arrow, JDBC, and Avro.
  • Ships with a desktop Studio notebook environment and Spark integration for running models inside Spark ML pipelines.
  • Visualization spans old-school Swing plots and declarative Vega-Lite charts.

Caveats

  • Version 5 and later require Java 25, which is aggressive for enterprise environments still migrating to Java 21.
  • The deep-learning and LLM modules rely on native LibTorch libraries, so “pure JVM” applies only to the classical side of the house.

Verdict

Worth a look if you are a JVM shop that wants to run LLaMA-3 or train gradient-boosted trees without spinning up a Python sidecar. Skip it if you are already invested in PyTorch or scikit-learn and do not need Java integration.

Frequently asked

What is haifengl/smile?
To keep machine learning—from LLaMA-3 inference to random forests—entirely inside the JVM ecosystem.
Is smile open source?
Yes — haifengl/smile is an open-source project tracked on heatdrop.
What language is smile written in?
haifengl/smile is primarily written in Java.
How popular is smile?
haifengl/smile has 6.4k stars on GitHub.
Where can I find smile?
haifengl/smile is on GitHub at https://github.com/haifengl/smile.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.