Vibeleaderboard
Index / tool

Jinfer

qxotic.ai
Visit qxotic.ai
Category
Developer Tools
Rank
No. 1188Tools index
Type
TOOL
Use case
Models: Train & Run
GitHub
185 stars
Date

About

Jinfer is an inference engine built natively for the JVM that runs chat, vision, audio, embeddings, reranking, and text-to-speech models without requiring Python, ONNX, Docker, or a sidecar process. It includes its own pure-Java tokenizers, GGUF/safetensors model loaders, and quantized matrix kernels competitive with llama.cpp on CPU, plus integrations for Spring AI, LangChain4j, and GraalVM Native Image for low-overhead binaries.

What it does

Jinfer lets a Java program load an open-weight model file and run it inside its own process, with no Python stack, model server or container beside it. You add it as a Maven dependency, point it at a Hugging Face model reference, and it downloads and caches the weights, then runs chat, image and audio input, embeddings, reranking, speech synthesis or transcription on the CPU. The same engine also ships as a command-line tool, a local server that speaks the OpenAI API, a compiled native binary, and a C library with a Python package on top.

Why it's ranked here

The case rests on scope backed by detail. The repository supports eighteen model families across chat, retrieval and speech, sixteen quantization and precision types, and hand-written matrix kernels for x86 from SSE3 to AVX-512, ARM NEON through I8MM, and Apple Metal, all under Apache 2.0 and published to Maven Central. Docs state operating limits precisely, down to which speculative-decoding workloads slow down. The headline claim, kernels competitive with llama.cpp, rests on benchmark charts and a methods page that were not part of what was read, so treat it as the project's own number until you reproduce it.

What's good

Structured output is enforced while tokens are generated, so a reply bound to a schema or a grammar cannot come back malformed, and the Python package accepts a plain dataclass or Pydantic class as that schema. The prompt cache can save a long system prompt to disk and reload it after a restart, and a cache miss falls back to recomputing rather than changing the answer. The local server binds to the loopback address by default, and the docs pair listening on any other interface with an API key. The model library is split per architecture, so an application can ship only the families it uses.

Tradeoffs

Jinfer needs JDK 25 and an incubator flag for the Java Vector API on every launch, which rules out older Java estates. The server runs one generation worker behind an admission gate, and generations on one engine are serialized by a lock, so it is a single-tenant tool, not a batching server for many users. The engine's own docs describe CPU kernels plus Metal on Apple; CUDA appears only in a separate tensor engine module. Version numbers are all below 1.0. Kokoro speech needs eSpeak installed, and the native binary needs ffmpeg to decode audio.

How to use it well

Pick it when a Java or Spring service should own its model in-process: retrieval with local embeddings and reranking, structured extraction, tool calling through LangChain4j or Spring AI, or offline transcription. Start with the small Liquid AI chat model from the examples, use the recommended 8-bit quantization, and add the native kernel module at runtime, falling back to the pure-Java one if native libraries cannot load. Set the offline switch in production so inference never checks upstream. For serving many concurrent users, or for GPU throughput outside Apple hardware, look elsewhere.

Technical notes+

Per jinfer/ARCHITECTURE.md the stack layers jinfer-core, codecs, kernels (GGUF loading and CPU kernels over MemoryView), cache and chat, with one ServiceLoader provider module per architecture discovered by Models.load; jinfer-models-all aggregates them. Threading is a single Parallel.shared() pool sized to physical cores (-Djinfer.threads), jam backends own no threads, and one fair lock per ChatEngine serializes generations. PromptCache combines retained sessions, byte-budgeted block checkpoints and an optional read-only JKVF catalog; block identities chain model identity with token IDs, and a restore re-ingests the last position for fresh logits. jinfer/pom.xml sets maven.compiler.release to 25 (the root pom.xml targets 11), excludes integration, bench and driver test groups by default, and freezes the 4x4 convolution tile at native-image build time. docs/jinfer/native.md describes libjinfer as a C API of twenty-nine functions, built per ISA level with x86-64-v3 (AVX2) as the floor and jam linked statically. jam/README.md lists the dispatch tiers and the jam-native, jam-vector and jam-scalar providers. docs/jinfer/python-comparison.md is the project's own usability comparison; it lists jinfer at 0.1.0 unpublished and says the other libraries' snippets were not executed.

Observed

License
Apache License 2.0 (root LICENSE and pom.xml)
Language
Java; jinfer modules compile for Java 25, native jam kernels in C built with CMake
Packaging
Maven artifacts under com.qxotic with a BOM; per-architecture model modules plus an all-models aggregate
Interfaces
Java library, LangChain4j and Spring AI providers, CLI (fat JAR or GraalVM native executable), OpenAI-compatible HTTP server, C API shared library, Python package
Server endpoints
Chat completions, embeddings, rerank and audio transcriptions; default bind 127.0.0.1:54154, API key required for other hosts
Model format
GGUF checkpoints resolved from Hugging Face or other hosts, cached locally, with an offline mode
CPU and GPU support
x86 SSE3 to AVX-512-VNNI, ARM NEON, DotProd and I8MM, Metal on Apple Silicon; jam lists Linux, macOS and Windows
Testing
Default suite runs with no models or network; model-loading integration tests are opt-in and fixture-gated

Read from README.md, pom.xml, LICENSE, jinfer/README.md, jinfer/ARCHITECTURE.md, jinfer/pom.xml, jinfer/jinfer-cli/README.md, docs/jinfer/native.md, docs/jinfer/python-comparison.md, jam/README.md.

Tags

javajvmllminferenceaigenai

Tech Stack

Node.jsJavaTypeScript

Media

Jinfer

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.