Instructions to use BrainboxAI/code-il-E4B-safetensors with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BrainboxAI/code-il-E4B-safetensors with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BrainboxAI/code-il-E4B-safetensors") 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("BrainboxAI/code-il-E4B-safetensors") model = AutoModelForMultimodalLM.from_pretrained("BrainboxAI/code-il-E4B-safetensors", 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 BrainboxAI/code-il-E4B-safetensors with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BrainboxAI/code-il-E4B-safetensors" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BrainboxAI/code-il-E4B-safetensors", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BrainboxAI/code-il-E4B-safetensors
- SGLang
How to use BrainboxAI/code-il-E4B-safetensors 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 "BrainboxAI/code-il-E4B-safetensors" \ --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": "BrainboxAI/code-il-E4B-safetensors", "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 "BrainboxAI/code-il-E4B-safetensors" \ --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": "BrainboxAI/code-il-E4B-safetensors", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use BrainboxAI/code-il-E4B-safetensors with Docker Model Runner:
docker model run hf.co/BrainboxAI/code-il-E4B-safetensors
bx-code-nogah (safetensors)
Repository id: BrainboxAI/code-il-E4B-safetensors
The full 16-bit weights of the coding assistant code-il-E4B. This is a companion repository, not a separate product.
bx-code-nogahis the model's name under the BrainboxAI naming convention. The repository id has not changed and will not change. Every existing link and script keeps working.
What is in here
One file: model.safetensors, 16.0 GB, alongside the tokenizer and the chat template.
These are the same weights as in the main repository, in a different format. The main repository holds a compressed build that runs on an ordinary development machine. This is the full-precision build, meant for working on the model rather than just running it.
When to take this build
- Loading the model with
transformersin Python. - Continuing training on your company's private codebase.
- Converting to ONNX or another deployment format.
- A framework that cannot read GGUF.
When not to take it
If you only want to run the model and write code with it, take the main repository, BrainboxAI/code-il-E4B. It is far smaller, works directly with Ollama or LM Studio, and will not give you worse answers.
How to load it
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("BrainboxAI/code-il-E4B-safetensors")
model = AutoModelForCausalLM.from_pretrained(
"BrainboxAI/code-il-E4B-safetensors",
torch_dtype="auto",
device_map="auto",
)
messages = [
{"role": "user", "content": "Implement binary search in TypeScript with full edge-case handling."},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs, max_new_tokens=1024, temperature=0.2, top_p=0.95)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The model also answers in Hebrew when addressed in Hebrew. The code itself always stays in English:
messages = [
# "Write me a Python function that parses ISO-8601 dates with timezones."
{"role": "user", "content": "תכתוב לי פונקציה בפייתון שמפרסרת תאריכים בפורמט ISO-8601 עם אזורי זמן."},
]
Continued training
This is the right build to start from if you want to train further on internal code. Start here rather than from the original Gemma model, so that the training already inside the model is preserved.
The full card lives elsewhere
What the model was trained on, what it knows, and above all what it does not know, is all on the main repository's card:
The repositories for this model
| Repository | What is inside |
|---|---|
BrainboxAI/code-il-E4B |
The compressed file for running, and the full card |
BrainboxAI/code-il-E4B-safetensors |
The full 16-bit weights. You are here |
License
Apache 2.0.
This is a fine-tune of unsloth/gemma-4-E4B-it, so the terms of that model apply here as well. The base model is published under Apache 2.0 and also points to the Gemma 4 licence terms.
Author
Built by Netanel Elyasi, founder of BrainboxAI, an Israeli applied-AI studio building small, private, domain-specialised models.
Questions, corrections, or a use case this model does not cover: netanele@brainboxai.io.
Part of the BrainboxAI family of on-device models. See also law-il-E2B (law) and cyber-analyst-4B (security).
- Downloads last month
- 280