Instructions to use scthornton/gemma4-26b-securecode with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use scthornton/gemma4-26b-securecode with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-26b-a4b-it") model = PeftModel.from_pretrained(base_model, "scthornton/gemma4-26b-securecode") - Transformers
How to use scthornton/gemma4-26b-securecode with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="scthornton/gemma4-26b-securecode") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("scthornton/gemma4-26b-securecode", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use scthornton/gemma4-26b-securecode with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "scthornton/gemma4-26b-securecode" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "scthornton/gemma4-26b-securecode", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/scthornton/gemma4-26b-securecode
- SGLang
How to use scthornton/gemma4-26b-securecode 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 "scthornton/gemma4-26b-securecode" \ --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": "scthornton/gemma4-26b-securecode", "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 "scthornton/gemma4-26b-securecode" \ --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": "scthornton/gemma4-26b-securecode", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use scthornton/gemma4-26b-securecode with Docker Model Runner:
docker model run hf.co/scthornton/gemma4-26b-securecode
- Xet hash:
- 299af78e84566e6de17b9aa9f59674bd569c387958d693b93475e502fe79ad4a
- Size of remote file:
- 5.71 kB
- SHA256:
- 5bdf412780aad6b6bc055248dd1640e0d1a2282e1c11f28390eac7fae5fae303
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.