Text Generation
Transformers
ONNX
English
causal-lm
tiny-transformer
edge-ai
int8
distillation
tinybert-style
Instructions to use MachadoDeCastro/krull-nano with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MachadoDeCastro/krull-nano with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MachadoDeCastro/krull-nano")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MachadoDeCastro/krull-nano", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MachadoDeCastro/krull-nano with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MachadoDeCastro/krull-nano" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MachadoDeCastro/krull-nano", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MachadoDeCastro/krull-nano
- SGLang
How to use MachadoDeCastro/krull-nano with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "MachadoDeCastro/krull-nano" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MachadoDeCastro/krull-nano", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "MachadoDeCastro/krull-nano" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MachadoDeCastro/krull-nano", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MachadoDeCastro/krull-nano with Docker Model Runner:
docker model run hf.co/MachadoDeCastro/krull-nano
| { | |
| "stoi": { | |
| "<unk>": 0, | |
| "\n": 1, | |
| " ": 2, | |
| ",": 3, | |
| "-": 4, | |
| ".": 5, | |
| "I": 6, | |
| "K": 7, | |
| "L": 8, | |
| "N": 9, | |
| "R": 10, | |
| "S": 11, | |
| "U": 12, | |
| "a": 13, | |
| "c": 14, | |
| "d": 15, | |
| "e": 16, | |
| "f": 17, | |
| "g": 18, | |
| "h": 19, | |
| "i": 20, | |
| "l": 21, | |
| "m": 22, | |
| "n": 23, | |
| "o": 24, | |
| "p": 25, | |
| "r": 26, | |
| "s": 27, | |
| "t": 28, | |
| "u": 29, | |
| "v": 30, | |
| "w": 31, | |
| "y": 32, | |
| "z": 33 | |
| } | |
| } |