Text Generation
Safetensors
GGUF
English
unsloth
gemma4_unified
fda warning letters
medical devices
gemma-4-12b
conversational
Instructions to use protocolsyncllc/medgap-gemma-4-12b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use protocolsyncllc/medgap-gemma-4-12b 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 protocolsyncllc/medgap-gemma-4-12b:Q6_K # Run inference directly in the terminal: llama cli -hf protocolsyncllc/medgap-gemma-4-12b:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf protocolsyncllc/medgap-gemma-4-12b:Q6_K # Run inference directly in the terminal: llama cli -hf protocolsyncllc/medgap-gemma-4-12b:Q6_K
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf protocolsyncllc/medgap-gemma-4-12b:Q6_K # Run inference directly in the terminal: ./build/bin/llama cli -hf protocolsyncllc/medgap-gemma-4-12b:Q6_K
Use Docker
docker model run hf.co/protocolsyncllc/medgap-gemma-4-12b:Q6_K
- Llama new
- LM Studio
- Jan
- vLLM
How to use protocolsyncllc/medgap-gemma-4-12b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "protocolsyncllc/medgap-gemma-4-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": "protocolsyncllc/medgap-gemma-4-12b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/protocolsyncllc/medgap-gemma-4-12b:Q6_K
- Ollama
How to use protocolsyncllc/medgap-gemma-4-12b with Ollama:
ollama run hf.co/protocolsyncllc/medgap-gemma-4-12b:Q6_K
- Unsloth Desktop
- Pi
How to use protocolsyncllc/medgap-gemma-4-12b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf protocolsyncllc/medgap-gemma-4-12b:Q6_K
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "protocolsyncllc/medgap-gemma-4-12b:Q6_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use protocolsyncllc/medgap-gemma-4-12b with Docker Model Runner:
docker model run hf.co/protocolsyncllc/medgap-gemma-4-12b:Q6_K
- Lemonade
How to use protocolsyncllc/medgap-gemma-4-12b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull protocolsyncllc/medgap-gemma-4-12b:Q6_K
Run and chat with the model
lemonade run user.medgap-gemma-4-12b-Q6_K
List all available models
lemonade list
- Hermes Agent
How to use protocolsyncllc/medgap-gemma-4-12b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf protocolsyncllc/medgap-gemma-4-12b:Q6_K
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default protocolsyncllc/medgap-gemma-4-12b:Q6_K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use protocolsyncllc/medgap-gemma-4-12b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf protocolsyncllc/medgap-gemma-4-12b:Q6_K
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "protocolsyncllc/medgap-gemma-4-12b:Q6_K" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload folder using huggingface_hub
Browse filesFiles changed (8)
35 unmodified lines36373835 unmodified linesgemma-4-12b-it_q8.gguf filter=lfs diff=lfs merge=lfs -textlora/tokenizer.json filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text35 unmodified lines3637383935 unmodified linesgemma-4-12b-it_q8.gguf filter=lfs diff=lfs merge=lfs -textlora/tokenizer.json filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -textgemma-4-12B-it_q8.gguf filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198{"architectures": ["Gemma4UnifiedForConditionalGeneration"],"audio_config": {"_name_or_path": "","architectures": null,"audio_embed_dim": 640,"chunk_size_feed_forward": 0,"torch_dtype": null,"id2label": {"0": "LABEL_0","1": "LABEL_1"},"initializer_range": 0.02,"is_encoder_decoder": false,"label2id": {"LABEL_0": 0,"LABEL_1": 1},"model_type": "gemma4_unified_audio","output_attentions": false,"output_hidden_states": false,"problem_type": null,"return_dict": true,"rms_norm_eps": 1e-06},"audio_token_id": 258881,"boa_token_id": 256000,"boi_token_id": 255999,"torch_dtype": "bfloat16","eoa_token_index": 258883,"eoi_token_id": 258882,"eos_token_id": 106,"image_token_id": 258880,"initializer_range": 0.02,"model_type": "gemma4_unified","pad_token_id": 0,"text_config": {"attention_bias": false,"attention_dropout": 0.0,"attention_k_eq_v": true,"bos_token_id": 2,"enable_moe_block": false,"eos_token_id": 1,"final_logit_softcapping": 30.0,"head_dim": 256,"hidden_activation": "gelu_pytorch_tanh","hidden_size": 3840,"hidden_size_per_layer_input": 0,"initializer_range": 0.02,"intermediate_size": 15360,"layer_types": ["sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention"],"max_position_embeddings": 262144,"model_type": "gemma4_unified_text","moe_intermediate_size": null,"num_attention_heads": 16,"num_experts": null,"num_hidden_layers": 48,"num_key_value_heads": 8,"num_kv_shared_layers": 0,"pad_token_id": 0,"per_layer_config": {"05": {"head_dim": 512,"num_key_value_heads": 1},"11": {"head_dim": 512,"num_key_value_heads": 1},"17": {"head_dim": 512,"num_key_value_heads": 1},"23": {"head_dim": 512,"num_key_value_heads": 1},"29": {"head_dim": 512,"num_key_value_heads": 1},"35": {"head_dim": 512,"num_key_value_heads": 1},"41": {"head_dim": 512,"num_key_value_heads": 1},"47": {"head_dim": 512,"num_key_value_heads": 1}},"rms_norm_eps": 1e-06,"rope_parameters": {"full_attention": {"partial_rotary_factor": 0.25,"rope_theta": 1000000.0,"rope_type": "proportional"},"sliding_attention": {"rope_theta": 10000.0,"rope_type": "default"}},"sliding_window": 1024,"tie_word_embeddings": true,"top_k_experts": null,"use_bidirectional_attention": "vision","use_cache": true,"use_double_wide_mlp": false,"vocab_size": 262144,"vocab_size_per_layer_input": 262144},"tie_word_embeddings": true,"unsloth_fixed": true,"video_token_id": 258884,"vision_config": {"_name_or_path": "","architectures": null,"chunk_size_feed_forward": 0,"torch_dtype": null,"id2label": {"0": "LABEL_0","1": "LABEL_1"},"initializer_range": 0.02,"is_encoder_decoder": false,"label2id": {"LABEL_0": 0,"LABEL_1": 1},"mm_embed_dim": 3840,"mm_posemb_size": 1120,"model_type": "gemma4_unified_vision","num_soft_tokens": 280,"output_attentions": false,"output_hidden_states": false,"output_proj_dims": 3840,"patch_size": 16,"pooling_kernel_size": 3,"problem_type": null,"return_dict": true,"rms_norm_eps": 1e-06}}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165{"architectures": ["Gemma4UnifiedForConditionalGeneration"],"audio_config": {"audio_embed_dim": 640,"initializer_range": 0.02,"model_type": "gemma4_unified_audio","rms_norm_eps": 1e-06},"audio_token_id": 258881,"boa_token_id": 256000,"boi_token_id": 255999,"torch_dtype": "bfloat16","eoa_token_index": 258883,"eoi_token_id": 258882,"eos_token_id": 106,"image_token_id": 258880,"initializer_range": 0.02,"model_type": "gemma4_unified","pad_token_id": 0,"text_config": {"attention_bias": false,"attention_dropout": 0.0,"attention_k_eq_v": true,"bos_token_id": 2,"enable_moe_block": false,"eos_token_id": 1,"final_logit_softcapping": 30.0,"head_dim": 256,"hidden_activation": "gelu_pytorch_tanh","hidden_size": 3840,"hidden_size_per_layer_input": 0,"initializer_range": 0.02,"intermediate_size": 15360,"layer_types": ["sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention"],"max_position_embeddings": 262144,"model_type": "gemma4_unified_text","moe_intermediate_size": null,"num_attention_heads": 16,"num_experts": null,"num_hidden_layers": 48,"num_key_value_heads": 8,"num_kv_shared_layers": 0,"pad_token_id": 0,"per_layer_config": {"05": {"head_dim": 512,"num_key_value_heads": 1},"11": {"head_dim": 512,"num_key_value_heads": 1},"17": {"head_dim": 512,"num_key_value_heads": 1},"23": {"head_dim": 512,"num_key_value_heads": 1},"29": {"head_dim": 512,"num_key_value_heads": 1},"35": {"head_dim": 512,"num_key_value_heads": 1},"41": {"head_dim": 512,"num_key_value_heads": 1},"47": {"head_dim": 512,"num_key_value_heads": 1}},"rms_norm_eps": 1e-06,"rope_parameters": {"full_attention": {"partial_rotary_factor": 0.25,"rope_theta": 1000000.0,"rope_type": "proportional"},"sliding_attention": {"rope_theta": 10000.0,"rope_type": "default"}},"sliding_window": 1024,"tie_word_embeddings": true,"top_k_experts": null,"use_bidirectional_attention": "vision","use_cache": true,"use_double_wide_mlp": false,"vocab_size": 262144,"vocab_size_per_layer_input": 262144},"tie_word_embeddings": true,"transformers_version": "5.20.2","unsloth_fixed": true,"video_token_id": 258884,"vision_config": {"initializer_range": 0.02,"mm_embed_dim": 3840,"mm_posemb_size": 1120,"model_type": "gemma4_unified_vision","num_soft_tokens": 280,"output_proj_dims": 3840,"patch_size": 16,"pooling_kernel_size": 3,"rms_norm_eps": 1e-06}}
123version https://git-lfs.github.com/spec/v1oid sha256:8f17551e9284ac9948a268c9c11ee7b5e02add916c26fe42935bbeb81d16e2e2size 126696468161 unmodified line234567894 unmodified lines14151617181 unmodified line"bos_token_id": 2,"do_sample": true,"eos_token_id": [1,106,50],"pad_token_id": 0,4 unmodified lines"temperature": 1.0,"top_k": 64,"top_p": 0.95,"transformers_version": "5.16.1"}1 unmodified line234567894 unmodified lines14151617181 unmodified line"bos_token_id": 2,"do_sample": true,"eos_token_id": [106,1,50],"pad_token_id": 0,4 unmodified lines"temperature": 1.0,"top_k": 64,"top_p": 0.95,"transformers_version": "5.20.2"}
123456789197 unmodified lines207208209210---base_model: unsloth/gemma-4-12b-itlibrary_name: peftpipeline_tag: text-generationtags:- base_model:adapter:unsloth/gemma-4-12b-it- lora- sft- transformers197 unmodified lines[More Information Needed]### Framework versions- PEFT 0.18.1123456789197 unmodified lines207208209210---base_model: unsloth/gemma-4-12B-itlibrary_name: peftpipeline_tag: text-generationtags:- base_model:adapter:unsloth/gemma-4-12B-it- lora- sft- transformers197 unmodified lines[More Information Needed]### Framework versions- PEFT 0.21.2
3 unmodified lines456789101112132 unmodified lines1617181920211 unmodified line23242526272829303132333435363738394041423 unmodified lines"arrow_config": null,"auto_mapping": {"base_model_class": "Gemma4UnifiedForConditionalGeneration","parent_library": "transformers.models.gemma4_unified.modeling_gemma4_unified","unsloth_fixed": true},"base_model_name_or_path": "unsloth/gemma-4-12b-it","bias": "none","corda_config": null,"ensure_weight_tying": false,2 unmodified lines"fan_in_fan_out": false,"inference_mode": true,"init_lora_weights": true,"layer_replication": null,"layers_pattern": null,"layers_to_transform": null,1 unmodified line"lora_alpha": 16,"lora_bias": false,"lora_dropout": 0,"megatron_config": null,"megatron_core": "megatron.core","modules_to_save": null,"peft_type": "LORA","peft_version": "0.18.1","qalora_group_size": 16,"r": 64,"rank_pattern": {},"revision": null,"target_modules": "(?:.*?(?:language|text).*?(?:self_attn|attention|attn|mixer|mlp|feed_forward|ffn|dense|mixer).*?(?:q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj))|(?:\\bmodel\\.layers\\.[\\d]{1,}\\.(?:self_attn|attention|attn|mixer|mlp|feed_forward|ffn|dense|mixer)\\.(?:(?:q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj)))","target_parameters": null,"task_type": "CAUSAL_LM","trainable_token_indices": null,"use_dora": false,"use_qalora": false,"use_rslora": false}3 unmodified lines456789101112132 unmodified lines161718192021221 unmodified line2425262728293031323334353637383940414243444546473 unmodified lines"arrow_config": null,"auto_mapping": {"base_model_class": "Gemma4UnifiedForConditionalGeneration","parent_library": "unsloth_compiled_module_gemma4_unified","unsloth_fixed": true},"base_model_name_or_path": "unsloth/gemma-4-12B-it","bias": "none","corda_config": null,"ensure_weight_tying": false,2 unmodified lines"fan_in_fan_out": false,"inference_mode": true,"init_lora_weights": true,"kasa_config": null,"layer_replication": null,"layers_pattern": null,"layers_to_transform": null,1 unmodified line"lora_alpha": 16,"lora_bias": false,"lora_dropout": 0,"lora_ga_config": null,"megatron_config": null,"megatron_core": "megatron.core","modules_to_save": null,"monteclora_config": null,"peft_type": "LORA","peft_version": "0.21.2","qalora_group_size": 16,"r": 64,"rank_pattern": {},"revision": null,"target_modules": "(?:.*?(?:language|text).*?(?:self_attn|attention|attn|mixer|mlp|feed_forward|ffn|dense|mixer).*?\\.(?:q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj))|(?:\\bmodel\\.layers\\.[\\d]{1,}(?!.*\\.experts\\.\\d)\\..*?(?:self_attn|attention|attn|mixer|mlp|feed_forward|ffn|dense|mixer).*?\\.(?:(?:q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj)))","target_parameters": null,"task_type": "CAUSAL_LM","trainable_token_indices": null,"use_bdlora": null,"use_dora": false,"use_qalora": false,"use_rslora": false,"velora_config": null}
123version https://git-lfs.github.com/spec/v1oid sha256:e4d955ef8d129dd5ee9359f66deefdf473d8764dc3b0f0acde9542dcd019ab43size 1049198920123version https://git-lfs.github.com/spec/v1oid sha256:79d7923a2508fdafe921ba9cfd83ca984c406e27c39841576b203c73c15869c1size 1049198920
123version https://git-lfs.github.com/spec/v1oid sha256:becf2047c5b52ce874fad0d520357def3b1d1e1f7d7f84843deb19da9aab79f9size 23919549408123version https://git-lfs.github.com/spec/v1oid sha256:03e795f5bd5a85054b7c91b89c357993617911aca8404b06778853d1f17d72b3size 23919549408
.gitattributes+1
config.json+160-193
gemma-4-12B-it_q8.ggufAdded+3
generation_config.json+2-2
lora/README.md+3-3
lora/adapter_config.json+10-5
lora/adapter_model.safetensors+1-1
model.safetensors+1-1