Text Generation
Transformers
Safetensors
English
gemma4
image-text-to-text
gemma
raw
frankenmerge
source
mergekit
conversational
4-bit precision
Instructions to use stamsam/FrankenGemma4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stamsam/FrankenGemma4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="stamsam/FrankenGemma4") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("stamsam/FrankenGemma4") model = AutoModelForMultimodalLM.from_pretrained("stamsam/FrankenGemma4", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use stamsam/FrankenGemma4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "stamsam/FrankenGemma4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stamsam/FrankenGemma4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/stamsam/FrankenGemma4
- SGLang
How to use stamsam/FrankenGemma4 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 "stamsam/FrankenGemma4" \ --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": "stamsam/FrankenGemma4", "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 "stamsam/FrankenGemma4" \ --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": "stamsam/FrankenGemma4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use stamsam/FrankenGemma4 with Docker Model Runner:
docker model run hf.co/stamsam/FrankenGemma4
|
Download FILE_LAYOUT.md from stamsam/FrankenGemma4: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/stamsam/FrankenGemma4/resolve/main/FILE_LAYOUT.md
- Command line
-
hf download hf://stamsam/FrankenGemma4/FILE_LAYOUT.md
-
curl -L -o FILE_LAYOUT.md https://huggingface.co/stamsam/FrankenGemma4/resolve/main/FILE_LAYOUT.md
1.09 kB
| # Suggested Hugging Face Repo Layout | |
| The intended upload layout for `stamsam/FrankenGemma4` is: | |
| ```text | |
| FrankenGemma4/ | |
| README.md | |
| config.json | |
| tokenizer.json | |
| tokenizer_config.json | |
| chat_template.jinja | |
| model.safetensors | |
| model.safetensors.index.json | |
| assets/ | |
| FrankenGemma4.jpg | |
| benchmarks/ | |
| q4_benchmark_table.csv | |
| q4_benchmark_table.md | |
| q4_benchmark_summary.json | |
| openclaw_hermes_eval_v15_table.csv | |
| openclaw_hermes_eval_v15_table.md | |
| openclaw_hermes_eval_v15_summary.json | |
| adapters/ | |
| leakguard-20/ | |
| adapter_config.json | |
| adapters.safetensors | |
| structured-1600-0040/ | |
| adapter_config.json | |
| adapters.safetensors | |
| ``` | |
| ## Recommended Meaning | |
| - Root files: default MLX Q4 FrankenGemma4 model | |
| - `adapters/leakguard-20`: control / leak-suppression branch | |
| - `adapters/structured-1600-0040`: best current structured-chat branch | |
| ## Why This Layout | |
| - Keeps the default experience simple | |
| - Preserves the best specialized branches without forcing one single merged claim | |
| - Makes the model card and benchmark evidence browsable inside the repo | |