Image-Text-to-Text
Transformers
Safetensors
GGUF
gemma3
Generated from Trainer
trl
unsloth
sft
conversational
text-generation-inference
Instructions to use alibayram/magibu-128k-trained with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alibayram/magibu-128k-trained with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="alibayram/magibu-128k-trained") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("alibayram/magibu-128k-trained") model = AutoModelForMultimodalLM.from_pretrained("alibayram/magibu-128k-trained", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use alibayram/magibu-128k-trained with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf alibayram/magibu-128k-trained:BF16 # Run inference directly in the terminal: llama cli -hf alibayram/magibu-128k-trained:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf alibayram/magibu-128k-trained:BF16 # Run inference directly in the terminal: llama cli -hf alibayram/magibu-128k-trained:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf alibayram/magibu-128k-trained:BF16 # Run inference directly in the terminal: ./llama-cli -hf alibayram/magibu-128k-trained:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf alibayram/magibu-128k-trained:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf alibayram/magibu-128k-trained:BF16
Use Docker
docker model run hf.co/alibayram/magibu-128k-trained:BF16
- LM Studio
- Jan
- vLLM
How to use alibayram/magibu-128k-trained with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "alibayram/magibu-128k-trained" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alibayram/magibu-128k-trained", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/alibayram/magibu-128k-trained:BF16
- SGLang
How to use alibayram/magibu-128k-trained 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 "alibayram/magibu-128k-trained" \ --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": "alibayram/magibu-128k-trained", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "alibayram/magibu-128k-trained" \ --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": "alibayram/magibu-128k-trained", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use alibayram/magibu-128k-trained with Ollama:
ollama run hf.co/alibayram/magibu-128k-trained:BF16
- Unsloth Desktop
- Docker Model Runner
How to use alibayram/magibu-128k-trained with Docker Model Runner:
docker model run hf.co/alibayram/magibu-128k-trained:BF16
- Lemonade
How to use alibayram/magibu-128k-trained with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull alibayram/magibu-128k-trained:BF16
Run and chat with the model
lemonade run user.magibu-128k-trained-BF16
List all available models
lemonade list
- Atomic Chat
Model Card for magibu-128k-trained
This model is a fine-tuned version of alibayram/magibu-128k-embed-init. It has been trained using TRL.
Quick start
from transformers import pipeline
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
generator = pipeline("text-generation", model="alibayram/magibu-128k-trained", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])
Training procedure
This model was trained with SFT.
Framework versions
- TRL: 0.24.0
- Transformers: 4.57.3
- Pytorch: 2.9.1
- Datasets: 4.3.0
- Tokenizers: 0.22.2
Citations
Cite TRL as:
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}
- Downloads last month
- 98