Instructions to use nebulitgmbh/event-modeling-gemma-4-e4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nebulitgmbh/event-modeling-gemma-4-e4b 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-e4b") 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-e4b") model = AutoModelForMultimodalLM.from_pretrained("nebulitgmbh/event-modeling-gemma-4-e4b", 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-e4b 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-e4b" # 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-e4b", "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-e4b
- SGLang
How to use nebulitgmbh/event-modeling-gemma-4-e4b 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-e4b" \ --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-e4b", "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-e4b" \ --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-e4b", "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-e4b with Docker Model Runner:
docker model run hf.co/nebulitgmbh/event-modeling-gemma-4-e4b
Event Modeling assistant (Gemma 4 E4B, fine-tuned) - experimental
LoRA fine-tune of Gemma 4 E4B-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 (weights plus compiled WebGPU library) is in
event-modeling-gemma-4-e4b-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
LoRA rank 64, learning rate 1e-4, 3 epochs, about 3,640 examples. The data covers 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. This is the best of nine hyperparameter and data-mix experiments (changes to learning rate, epochs, rank and data weights all scored worse or equal).
Results (small samples, treat as indicative)
- Held-out loss 0.681.
- 11 of 12 held-out "write the model JSON" prompts produced schema-valid JSON (0.92); 6 of 6 when asked for JSON only.
- No repetition loops on 15 fresh questions, with greedy or sampled decoding.
Limitations
- Weak on opinion and knowledge questions; it can state definitions confidently and imprecisely.
- Validate generated JSON against the schema, or use schema-constrained decoding.
- Small model, small dataset. Not a substitute for the book or the documentation.
- Downloads last month
- 46