Instructions to use teapotai/teapotllm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use teapotai/teapotllm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="teapotai/teapotllm")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("teapotai/teapotllm") model = AutoModelForSeq2SeqLM.from_pretrained("teapotai/teapotllm") - Transformers.js
How to use teapotai/teapotllm with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'teapotai/teapotllm'); - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use teapotai/teapotllm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "teapotai/teapotllm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "teapotai/teapotllm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/teapotai/teapotllm
- SGLang
How to use teapotai/teapotllm 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 "teapotai/teapotllm" \ --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": "teapotai/teapotllm", "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 "teapotai/teapotllm" \ --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": "teapotai/teapotllm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use teapotai/teapotllm with Docker Model Runner:
docker model run hf.co/teapotai/teapotllm
What is the mode's context length?
^
From what I read, 512 tokens.
I know that is the limit for the .query method, is there no way to use a larger context window? Cant really do much 512 tokens!
True, maybe you could find some better results using sliding window, but not sure what options we have in this model.
I find the benchmarks here a little biased.
Really cool idea to have a lightweight LLM focused on accuracy and params < 1x10^9 though, was experimenting with making a desktop app for RAG use with textbooks but the limited context window killed that idea.
Hey all,
Yes the context window is 512 with the ability to scale up to 1024 (same as flan-t5).
This is a small model designed to run on a CPU- 1k tokens of context runs incredibly slow on a CPU, and so we are investing heavily in setting up RAG systems around teapotllm for fast client inference.
You can check out our library docs here: https://teapotai.com/docs#2-chat-with-retrieval-augmented-generation-rag
Additionally if you want help with any projects, come visit our discord! We've already seen some cool examples of FAQ chatbots and RAG applications.
https://discord.gg/hPxGSn5dST