Instructions to use kushalpatil/jevify-gemma4-26b-a4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kushalpatil/jevify-gemma4-26b-a4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="kushalpatil/jevify-gemma4-26b-a4b") 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("kushalpatil/jevify-gemma4-26b-a4b") model = AutoModelForMultimodalLM.from_pretrained("kushalpatil/jevify-gemma4-26b-a4b", 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
- vLLM
How to use kushalpatil/jevify-gemma4-26b-a4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kushalpatil/jevify-gemma4-26b-a4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kushalpatil/jevify-gemma4-26b-a4b", "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/kushalpatil/jevify-gemma4-26b-a4b
- SGLang
How to use kushalpatil/jevify-gemma4-26b-a4b 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 "kushalpatil/jevify-gemma4-26b-a4b" \ --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": "kushalpatil/jevify-gemma4-26b-a4b", "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 "kushalpatil/jevify-gemma4-26b-a4b" \ --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": "kushalpatil/jevify-gemma4-26b-a4b", "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 kushalpatil/jevify-gemma4-26b-a4b with Docker Model Runner:
docker model run hf.co/kushalpatil/jevify-gemma4-26b-a4b
kushalpatil/jevify-gemma4-26b-a4b
google/gemma-4-26B-A4B-it fine-tuned (LoRA, merged) to give honest probabilities when asked typed questions
about a piece of state — the model behind jevify, a local,
Jev-compatible probabilistic decision API.
Nothing is generated: one prefill, read the next-token distribution over the answer labels, done.
Use
pip install "jevify[transformers] @ git+https://github.com/kushalpatil07/jevify"
jevify serve --model kushalpatil/jevify-gemma4-26b-a4b # POST /v1/systemone, Jev wire format
from jevify import Jevify, Noul, Choice, Score
jev = Jevify.from_transformers("kushalpatil/jevify-gemma4-26b-a4b") # or serve it with vLLM and use Jevify.from_runtime("vllm", "kushalpatil/jevify-gemma4-26b-a4b")
jev.system_one("Help! My payouts have been failing for 3 days.", {
"urgent": Noul("Does this convey urgency?"),
"team": Choice("Which team should handle this?", {"billing": None, "technical": None, "sales": None}),
"mood": Score("How frustrated is the customer?", ["calm", "frustrated", "furious"]),
})
Training
LoRA r=64 on attention projections, 2 epochs over ~47k (state, question, target-distribution)
items from 16 sources: hard-labeled classification sets with randomized option subsets and
order, multi-annotator sets with real human label distributions, and constructed long states
(up to 24k tokens) with answers known by construction. Loss = KL(target || label distribution).
No teacher model. Recipe: train/ in the jevify repo.
Results
Held-out, out-of-distribution (6 datasets not used in training; 307 items), no post-hoc scaling:
ood_massive n= 50 acc=0.860 nll=0.349 brier=0.179 ece=0.102 conf=0.939
ood_trec n= 50 acc=0.940 nll=0.202 brier=0.102 ece=0.064 conf=0.922
ood_paws n= 50 acc=0.580 nll=0.971 brier=0.599 ece=0.288 conf=0.855
ood_sms_spam n= 50 acc=0.960 nll=0.112 brier=0.056 ece=0.038 conf=0.946
ood_app_reviews n= 50 acc=0.700 nll=0.939 brier=0.451 ece=0.166 conf=0.717
ood_subj n= 50 acc=0.940 nll=0.183 brier=0.090 ece=0.149 conf=0.862
spike n= 7 acc=1.000 nll=0.064 brier=0.024 ece=0.057 conf=0.943
ALL n= 307 acc=0.834 nll=0.450 brier=0.241 ece=0.061 conf=0.875
In-distribution held-out (800 items), raw -> trained:
step 0 acc=0.757 conf=0.991 ece=0.234 nll=3.179 brier=0.425
step 1215 acc=0.821 conf=0.829 ece=0.032 nll=0.422 brier=0.188
- Downloads last month
- 30