Instructions to use gghfez/openwebui-title-generator-270m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gghfez/openwebui-title-generator-270m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gghfez/openwebui-title-generator-270m") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("gghfez/openwebui-title-generator-270m") model = AutoModelForCausalLM.from_pretrained("gghfez/openwebui-title-generator-270m") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use gghfez/openwebui-title-generator-270m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gghfez/openwebui-title-generator-270m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gghfez/openwebui-title-generator-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gghfez/openwebui-title-generator-270m
- SGLang
How to use gghfez/openwebui-title-generator-270m 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 "gghfez/openwebui-title-generator-270m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gghfez/openwebui-title-generator-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "gghfez/openwebui-title-generator-270m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gghfez/openwebui-title-generator-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use gghfez/openwebui-title-generator-270m with Docker Model Runner:
docker model run hf.co/gghfez/openwebui-title-generator-270m
OpenWebUI Title Generator - Gemma 270M
A fine-tuned Gemma 270M model specialized for generating concise, emoji-enhanced titles for chat conversations. Use this to avoid wasting API credits or wiping out the llama.cpp KV cache after the first message.
Model Description
This model was fine-tuned on 8,900 examples of chat conversation title generation tasks. It takes chat history as input and outputs a JSON-formatted title with 3-5 words and relevant emojis.
Intended Use
- Generate titles for chat conversations in OpenWebUI
- Summarize conversation themes quickly
- Create engaging, emoji-enhanced titles
Performance
- Fast inference suitable for real-time title generation
- Lightweight at 270M parameters
- Consistent JSON output format
Usage
Set this as the "Task Model" in OpenWebUI.
Settings -> Admin -> Interface
Prompt format
The default OpenWebUI prompt format:
### Task:
Generate a concise, 3-5 word title with an emoji summarizing the chat history.
### Guidelines:
- The title should clearly represent the main theme or subject of the conversation.
- Use emojis that enhance understanding of the topic, but avoid quotation marks or special formatting.
- Write the title in the chat's primary language; default to English if multilingual.
- Prioritize accuracy over excessive creativity; keep it clear and simple.
### Output:
JSON format: { "title": "your concise title here" }
### Examples:
- { "title": "📉 Stock Market Trends" },
- { "title": "🍪 Perfect Chocolate Chip Recipe" },
- { "title": "Evolution of Music Streaming" },
- { "title": "Remote Work Productivity Tips" },
- { "title": "Artificial Intelligence in Healthcare" },
- { "title": "🎮 Video Game Development Insights" }
### Chat History:
<chat_history>
USER: hi
ASSISTANT: Hello! How can I assist you today? 😊
USER: who are you?
ASSISTANT: I’m Gemma, a large language model created by the Gemma team at Google DeepMind. I’m an open-weights model, which means I’m widely available for public use!
</chat_history>
Expected response:
'{"title": "👋 Simple Greeting"}'
Limitations
- Optimized specifically for title generation in OpenWebUI
- May not perform well in other chat interfaces
- Emojis sometimes not placed consistently or may be omitted entirely
- Only tested at BF16
- Downloads last month
- 69