Skip to main content

Tinfer — Tiny Inference Engine. Run LLMs locally with GPU acceleration.

Project description

Tinfer — Tiny Inference Engine

Run LLMs locally with GPU acceleration. No dependencies, no cloud, no API keys.

Install

pip install tinfer

Quick Start

CLI Chat

tinfer -m model.gguf -p "Hello, what is AI?"

Server + WebUI

tinfer-server -m model.gguf --port 8080
# Open http://localhost:8080 for the chat interface

Python API

from tinfer import Server, chat

# Start server programmatically
with Server("model.gguf", port=8080, n_gpu_layers=-1) as s:
    response = chat("What is artificial intelligence?")
    print(response)

HTTP API (OpenAI-compatible)

curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"role": "user", "content": "Hello"}], "max_tokens": 100}'

Features

  • CLI — Interactive chat and text completion
  • Server — HTTP server with built-in WebUI
  • API — OpenAI-compatible /v1/chat/completions endpoint
  • GPU — CUDA acceleration out of the box
  • Quantized — Run GGUF models (Q4, Q5, Q8) efficiently
  • MoE — Mixture of Experts model support
  • Vision — Multimodal model support

Python Client

from tinfer import chat, complete, models, set_server

# Point to a running server
set_server("http://localhost:8080")

# Simple chat
print(chat("Explain quantum computing in 3 sentences"))

# Chat with system prompt
print(chat([
    {"role": "system", "content": "You are a pirate."},
    {"role": "user", "content": "What's the weather?"}
]))

# List models
for m in models():
    print(m["id"])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tinfer_ai-0.1.0-py3-none-win_amd64.whl (20.7 MB view details)

Uploaded Python 3Windows x86-64

File details

Details for the file tinfer_ai-0.1.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: tinfer_ai-0.1.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 20.7 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for tinfer_ai-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5e7963655c0f4e734b61392ce1561bcabcd206bae33ac61735797311c6b3b1bb
MD5 79bdf17f48f07bfedb0283406b9dafb2
BLAKE2b-256 b7b2be57bf42d9978f2872550dae7eb99c90d06b7ba8c3977ad7e771c943b22a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page