Run LLM inference from Java — moved
|
This how-to moved. The KLlama / KBert Java inference APIs
described here ( |
Start here instead:
What stayed in mainline and is still useful for LLM workflows:
-
Load models (GGUF, SafeTensors, ONNX) —
StreamingGGUFReader,StreamingSafeTensorsReader, zero-copy file-backed loads, quantization-preserving paths. -
The
TokenizerFactoryinskainet-io-coredispatches to the right implementation per model architecture — Qwen / GPT-2 byte-level BPE viaQwenByteLevelBpeTokenizer, LLaMA / Gemma / TinyLlama SentencePiece viaSentencePieceTokenizer. Both verified against HuggingFace reference token IDs. Usable from Java viaTokenizerFactory.fromGguf(fields)orfromTokenizerJson(json). -
The
TensorEncodingmetadata onTensorSpeccarries Q4_K / Q8_0 / TernaryPacked quant layout through the graph IR, so backends can dispatch on it — see the 0.19.0 release notes.