Instructions to use nebulitgmbh/event-modeling-gemma-4-e2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nebulitgmbh/event-modeling-gemma-4-e2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="nebulitgmbh/event-modeling-gemma-4-e2b") 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("nebulitgmbh/event-modeling-gemma-4-e2b") model = AutoModelForMultimodalLM.from_pretrained("nebulitgmbh/event-modeling-gemma-4-e2b", 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 nebulitgmbh/event-modeling-gemma-4-e2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nebulitgmbh/event-modeling-gemma-4-e2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nebulitgmbh/event-modeling-gemma-4-e2b", "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/nebulitgmbh/event-modeling-gemma-4-e2b
- SGLang
How to use nebulitgmbh/event-modeling-gemma-4-e2b 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 "nebulitgmbh/event-modeling-gemma-4-e2b" \ --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": "nebulitgmbh/event-modeling-gemma-4-e2b", "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 "nebulitgmbh/event-modeling-gemma-4-e2b" \ --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": "nebulitgmbh/event-modeling-gemma-4-e2b", "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 nebulitgmbh/event-modeling-gemma-4-e2b with Docker Model Runner:
docker model run hf.co/nebulitgmbh/event-modeling-gemma-4-e2b
Event Modeling assistant (Gemma 4 E2B, fine-tuned) - experimental
LoRA fine-tune of Gemma 4 E2B-it, merged to bf16.
It explains Event Modeling concepts and writes Event Modeling model JSON (commands, events, read models, screens, automations, Given/When/Then scenarios).
The adapter/ folder holds the LoRA adapter alone. A WebLLM/MLC build is in
event-modeling-gemma-4-e2b-q4f16_1-MLC.
License: this model is a derivative of Gemma 4, which Google released under the Apache License 2.0. This model is provided under the same license; it is a modified version of the original weights (fine-tuned and, in the MLC repos, quantized).
Training data
About 3,250 examples: Event Modeling skills, boards and long-form writing by the author, public pages of eventmodelers.ai, the Event Modeling JSON schema, and templated examples generated from sample boards. Some answers were drafted with Claude and GLM-5.3-Flash and filtered with a schema validator.
Results (small samples, treat as indicative)
- Held-out loss 0.715.
- 22 of 25 held-out "write the model JSON" prompts produced schema-valid JSON (88%). Failures: missing required fields, wrong enum values.
- With greedy decoding, 6 of 30 fresh questions fell into repetition loops; use
repetition_penaltyabout 1.05 or sampling (0 of 30 looped when sampled).
Limitations
- Weak on opinion and knowledge questions; it can state definitions confidently and wrongly (for example, it mixed up read models and projections in one test).
- Validate generated JSON against the schema, or use schema-constrained decoding.
- Small model, trained on a small dataset. Not a substitute for the book or the documentation.
- Downloads last month
- 61