@jino_rohit: over the last 6-8 months, ive been trying to move towards the ml systems and ai infra space. these are some of my favor…
Summary
The author shares their work over 6-8 months in ML systems and AI infrastructure, including a lightweight Python LLM inference engine (tachyon) that achieves 600+ tokens/s on consumer hardware with continuous batching and prefix caching, alongside blog posts on CUDA/CUTE DSL and collective communication, and contributions to SGLang and vLLM.
View Cached Full Text
Cached at: 07/13/26, 11:53 AM
over the last 6-8 months, ive been trying to move towards the ml systems and ai infra space. these are some of my favorite work ive done -
- a small python inference engine which is mainly a testbed for me to implement the major inference techniques, its about 600 toks/s on an rtx 4060 ti with prefix caching - https://github.com/JINO-ROHIT/tachyon…
- wrote a blog post that outperforms cublas on ada using cute dsl - https://jino-rohit.github.io/blogs/08_cute_dsl_matmul.html…
- a detailed post on ncccl collective communication - https://jino-rohit.github.io/blogs/11_collective_communication.html…
- a blog series on how torch compile works and internal mechanics - https://jino-rohit.github.io/blogs/
- i maintain my notes and experiments of most of the work around ml systems here - https://github.com/JINO-ROHIT/ml-systems-notes…
- open source work in sglang and llm-compressor(vllm).
im trying to become a stronger ml systems and inference engineer. what should i spend my next months getting better on?
JINO-ROHIT/tachyon
Source: https://github.com/JINO-ROHIT/tachyon
tachyon
a LLM inference engine to run on consumer hardware.
- each request has its own state and you can choose to disable or enable kv cache on a request level.
- supports continous batching where the decode step is batched to max out gpu, and requests get recycled as soon as it is completed from the active batch to allow new requests to enter the batch.
- the prefill step is batched using a smaller batch size to avoid OOMs
- vectorized operations to improve batch performance.
- prefix caching to save on expensive prefill computation when there is shared system prompts or few shot examples etc.
- 3 lines to invoke the engine and run inference!
Usage
- first download the weights for llama 1B.
hf_hub_download(
repo_id=f"meta-llama/Llama-3.2-1B-Instruct",
filename="model.safetensors",
local_dir=f"Llama-3.2-1B-Instruct"
)
- invoke the engine.
from tachyon.engine.llm import Engine
engine = Engine("meta-llama/Llama-3.2-1B-Instruct")
print(engine.generate_text("Explain AGI")) # for single request
#for multiple requests
outputs = engine.generate_text([
"Explain AGI",
"What is vLLM?",
"Tell me about SGLang"
])
for o in outputs:
print(o)
OpenAI compatible server
You can spin up the server and then use the openai library to invoke the model as well -
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8000/v1",
api_key="anything"
)
resp = client.chat.completions.create(
model="llama-3.2-1b-instruct",
messages=[{"role": "user", "content": "Hello"}],
stream=False,
)
- benchmark script
python3 benchmark.py
current benchmarks(rtx 4060 ti 16GB)
| implementation | tokens generated | time taken | tok/s |
|---|---|---|---|
| naive torch | 3031 | 233.171 s | 13 tok/s |
| naive torch with kv cache | 3200 | 37.771 s | 84.72 tok/s |
| static batching | 31309 | 369.081 s | 84.83 tok/s |
| continuous batching (bs=10) | 30600 | 111.657 s | 274.05 tok/s |
| continuous batching (bs=30) | 29000 | 89.755 s | 323.10 tok/s |
| continuous batching (bs=50) | 29800 | 87.442 s | 340.80 tok/s |
| continuous batching (bs=50) with vectorized ops and batched prefill | 30500 | 71.731 s | 425.20 tok/s |
| prefix caching with similar requests | 36100 | 54.469 s | 662.76 toks/s |

to-do
- implement llama 3 family model.
- make it into a serving engine.
- write a benchmark script and check latency and throughput.
- add kv cache.
- continous batching
- prefix caching
- add an openai compatible api server
- test the effect of torch compile (open PR, come back to this)
- paged attention
- more techniques
Similar Articles
@TheAhmadOsman: My mission since 2023 has been to teach people and prepare them running their own AI June 2026 marks the most important…
Ahmad (@TheAhmadOsman) announces a blogpost covering inference engines like llama.cpp, vLLM, and ExLlamaV2, focusing on multi-GPU setups, tensor parallelism, and batch inference for optimized AI model performance.
@TheAhmadOsman: How to go about learning all of this? 1st: Start with the serving engine view - vLLM: PagedAttention, continuous batchi…
A detailed guide on learning AI inference engine internals, covering serving engines like vLLM and SGLang, low-level GPU kernel programming with Triton and CUTLASS, and a sequence of mini-projects to build hands-on expertise.
@ying11231: Impressive performance on TPU.
A blog post from LMSYS Org details optimizing Ling-2.6-1T, a 1 trillion parameter hybrid MoE model, on TPU v7x using SGLang-JAX, achieving efficient inference by hiding MoE data movement behind computation with a single Pallas kernel.
@TheAhmadOsman: Why do I focus on Inference Engines/Software Stacks for your hardware? - 2x RTX 3090s: ~14.5 tok/s → ~64 tok/s moving t…
Comparison of inference engine performance on different hardware: moving from baseline to vLLM with TP=2 on 2x RTX 3090s improves from ~14.5 tok/s to ~64 tok/s, and on RTX PRO 6000 moving to Sglang improves from ~32 tok/s to ~110 tok/s. Recommends vLLM/Sglang for CUDA/multi-GPU and llama.cpp for edge devices.
Inference Engines for LLMs & Local AI Hardware (2026 Edition)
This article provides a comprehensive guide to LLM inference engines for local AI hardware in 2026, explaining how to choose based on hardware strategy, workload, and serving model, and covering engines like llama.cpp, MLX, ExLlamaV2/3, vLLM, SGLang, TensorRT-LLM, and NVIDIA Dynamo.