Instructions to use BananaMind/BananaMind-Title-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BananaMind/BananaMind-Title-1.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BananaMind/BananaMind-Title-1.0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("BananaMind/BananaMind-Title-1.0") model = AutoModelForCausalLM.from_pretrained("BananaMind/BananaMind-Title-1.0") 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 Settings
- vLLM
How to use BananaMind/BananaMind-Title-1.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BananaMind/BananaMind-Title-1.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BananaMind/BananaMind-Title-1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BananaMind/BananaMind-Title-1.0
- SGLang
How to use BananaMind/BananaMind-Title-1.0 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 "BananaMind/BananaMind-Title-1.0" \ --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": "BananaMind/BananaMind-Title-1.0", "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 "BananaMind/BananaMind-Title-1.0" \ --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": "BananaMind/BananaMind-Title-1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use BananaMind/BananaMind-Title-1.0 with Docker Model Runner:
docker model run hf.co/BananaMind/BananaMind-Title-1.0
BananaMind Title 1.0
BananaMind Title 1.0 is a compact chat title generation model full-finetuned from LiquidAI/LFM2.5-350M-Base.
Examples
Message:
why is my wifi disconnecting
Title:
Troubleshooting Wi-Fi Disconnection Issues
Message:
write a c# method to balance a budget
Title:
C# Budget Balancing Method
The model is intended to create neutral conversation titles. It is not intended to answer the user request.
Model Details
- Model name: BananaMind Title 1.0
- Base model: LiquidAI/LFM2.5-350M-Base
- Model family: LFM2.5
- Base parameter count: 350M
- Training method: full finetune
- Precision: BF16
- Task: first user message to short chat title
- Dataset: BananaMind/BananaMind-Chat-Titles-200K
- Recommended max input length: 2048 tokens
Why BananaMind Title?
Most AI Platforms use their most powerful model to generate titles, While this works, it uses alot of compute just for the title. BananaMind Title Focuses only on title generation and makes it only 350M Parameters which dramatically decreases the compute needed, this thing runs on a CPU Only Phone!GGUF is coming soon.
Prompt Format
Use this prompt format for best results:
Generate a short chat title.
Message: <first user message>
Title:
The model should complete only the title.
Using BananaMind Title
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "BananaMind/BananaMind-Title-1.0"
tokenizer = AutoTokenizer.from_pretrained(
model_id,
trust_remote_code=True,
)
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
model.config.use_cache = True
model.eval()
message = "What is a AI?"
prompt = f"""Generate a short chat title.
Message: {message}
Title:"""
inputs = tokenizer(
prompt,
return_tensors="pt",
truncation=True,
max_length=768,
).to(model.device)
with torch.inference_mode():
output = model.generate(
**inputs,
max_new_tokens=12,
do_sample=False,
repetition_penalty=1.1,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.pad_token_id,
use_cache=True,
)
title = tokenizer.decode(
output[0][inputs["input_ids"].shape[1]:],
skip_special_tokens=True,
).strip().split("\n")[0].strip()
print(title)
Training Summary
BananaMind Title 1.0 was full-finetuned from LiquidAI/LFM2.5-350M-Base on BananaMind/BananaMind-Chat-Titles-200K.
Training format:
Generate a short chat title.
Message: <first user message>
Title: <target title>
Prompt/input tokens were masked from loss. The model was trained to predict only the title completion tokens.
Training setup:
- base model: LiquidAI/LFM2.5-350M-Base
- dataset: BananaMind/BananaMind-Chat-Titles-200K
- method: full finetune
- precision: BF16
- max sequence length: 2048
- learning rate: 3e-5
- effective batch size: 128
- stopped around epoch 1
- observed eval loss near selected checkpoint: about 0.769
License and Attribution
This model is a derivative fine-tune of LiquidAI/LFM2.5-350M-Base by Liquid AI.
The base model is released under the LFM Open License v1.0. This fine-tuned model is distributed under the same license family and remains subject to the LFM Open License v1.0 terms.
Attribution:
- Base model: LiquidAI/LFM2.5-350M-Base
- Base model creator: Liquid AI, Inc.
- Base model license: LFM Open License v1.0
- Fine-tuned model: BananaMind/BananaMind-Title-1.0
- Fine-tuned by: BananaMind
- Training dataset: BananaMind/BananaMind-Chat-Titles-200K
Liquid AI retains ownership of the original base model. BananaMind provides the fine-tuning modifications for this derivative model.
Users should review the LFM Open License v1.0 before using, redistributing, or commercially deploying this model.
Citation
If you use this model, please attribute both the base model and this fine-tune:
BananaMind Title 1.0 is a full fine-tune of LiquidAI/LFM2.5-350M-Base for chat title generation, trained on BananaMind/BananaMind-Chat-Titles-200K.
Please retain Liquid AI attribution and license notices for the LFM base model.
- Downloads last month
- 29
