Getting Started
Welcome to the diktn documentation! This guide will help you configure and use the Diktn text generation AI framework.
# Installation
pip install diktn
# Quick Start
import diktn
model = diktn.load("mini-1b")
print(model.generate("AI is", max_new_tokens=50))
API Reference
Model Functions
diktn.
load(model_name)
- Loads a model from disk or HuggingFace
model.
generate(prompt, max_tokens=100)
- Generates text from input prompt
Examples
Text Generation
response = model.generate("The future of AI will", max_new_tokens=20)
print(response)
# Output: "The future of AI will bring breakthroughs in healthcare and education through accessible AI tools."
Custom Models
model = diktn.load("custom-model", quantize=True)
print(model.stats())
# Output: {"size": "4.7GB", "layers": 24, "params": 1.4e9}