Instructions to use ToastyPigeon/Gemma-3-Starshine-12B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ToastyPigeon/Gemma-3-Starshine-12B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ToastyPigeon/Gemma-3-Starshine-12B") 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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("ToastyPigeon/Gemma-3-Starshine-12B") model = AutoModelForImageTextToText.from_pretrained("ToastyPigeon/Gemma-3-Starshine-12B") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ToastyPigeon/Gemma-3-Starshine-12B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ToastyPigeon/Gemma-3-Starshine-12B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ToastyPigeon/Gemma-3-Starshine-12B", "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/ToastyPigeon/Gemma-3-Starshine-12B
- SGLang
How to use ToastyPigeon/Gemma-3-Starshine-12B 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 "ToastyPigeon/Gemma-3-Starshine-12B" \ --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": "ToastyPigeon/Gemma-3-Starshine-12B", "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 "ToastyPigeon/Gemma-3-Starshine-12B" \ --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": "ToastyPigeon/Gemma-3-Starshine-12B", "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" } } ] } ] }' - Docker Model Runner
How to use ToastyPigeon/Gemma-3-Starshine-12B with Docker Model Runner:
docker model run hf.co/ToastyPigeon/Gemma-3-Starshine-12B
🌠G3 Starshine 12B🌠
This was Merge A / A1 in the testing set.
A creative writing model based on a merge of fine-tunes on Gemma 3 12B IT and Gemma 3 12B PT.
This is the Story Focused merge. This version works better for storytelling and scenarios, as the prose is more novel-like and it has a tendency to impersonate the user character.
See the Alternate RP Focused version as well.
This is a merge of two G3 models, one trained on instruct and one trained on base:
- allura-org/Gemma-3-Glitter-12B - Itself a merge of a storywriting and RP train (both also by ToastyPigeon), on instruct
- ToastyPigeon/Gemma-3-Confetti-12B - Experimental application of the Glitter data using base instead of instruct, additionally includes some adventure data in the form of SpringDragon.
The result is a lovely blend of Glitter's ability to follow instructions and Confetti's free-spirit prose, effectively 'loosening up' much of the hesitancy that was left in Glitter.
Update: Vision tower is back! Have fun.
Thank you to jebcarter for the idea to make this. I love how it turned out!
Instruct Format
Uses Gemma2/3 instruct, but has been trained to recognize an optional system role.
Note: While it won't immediately balk at the system role, results may be better without it.
<start_of_turn>system
{optional system turn with prompt}<end_of_turn>
<start_of_turn>user
{User messages; can also put sysprompt here to use the built-in g3 training}<end_of_turn>
<start_of_turn>model
{model response}<end_of_turn>
Merge Configuration
Yeah, I actually tried several things and surprisingly this one worked best.
models:
- model: ToastyPigeon/Gemma-3-Confetti-12B
parameters:
weight: 0.5
- model: allura-org/Gemma-3-Glitter-12B
parameters:
weight: 0.5
merge_method: linear
tokenizer_source: allura-org/Gemma-3-Glitter-12B
- Downloads last month
- 14