Instructions to use Open4bits/granite-4.0-h-tiny-f16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Open4bits/granite-4.0-h-tiny-f16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Open4bits/granite-4.0-h-tiny-f16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Open4bits/granite-4.0-h-tiny-f16") model = AutoModelForCausalLM.from_pretrained("Open4bits/granite-4.0-h-tiny-f16") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Open4bits/granite-4.0-h-tiny-f16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Open4bits/granite-4.0-h-tiny-f16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Open4bits/granite-4.0-h-tiny-f16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Open4bits/granite-4.0-h-tiny-f16
- SGLang
How to use Open4bits/granite-4.0-h-tiny-f16 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 "Open4bits/granite-4.0-h-tiny-f16" \ --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": "Open4bits/granite-4.0-h-tiny-f16", "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 "Open4bits/granite-4.0-h-tiny-f16" \ --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": "Open4bits/granite-4.0-h-tiny-f16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Open4bits/granite-4.0-h-tiny-f16 with Docker Model Runner:
docker model run hf.co/Open4bits/granite-4.0-h-tiny-f16
Open4bits / Granite 4.0 H Tiny FP16
This repository provides the Granite 4.0 H Tiny model converted to FP16 (float16) precision, published by Open4bits for more efficient inference while preserving the original model behavior.
The underlying Granite model architecture and weights are owned by IBM. This repository contains only a precision-converted version of the original model.
The model is suitable for general-purpose text generation tasks and lightweight language model experimentation.
Model Overview
Granite is a family of transformer-based language models developed by IBM, designed for efficient and scalable natural language processing tasks.
This release uses the Granite 4.0 H Tiny variant, focusing on lower memory usage and faster inference while maintaining architectural fidelity to the original model.
Model Details
- Architecture: Granite 4.0 H Tiny
- Precision: float16 (FP16)
- Task: Text Generation
- Weight tying: Preserved
- Compatibility: Hugging Face Transformers, PyTorch
The FP16 conversion reduces VRAM requirements and improves inference speed compared to FP32 versions, making the model suitable for deployment on resource-constrained hardware.
Intended Use
This model is intended for:
- Text generation and completion
- Research and experimentation
- Lightweight inference workloads
- Prototyping and benchmarking language models
Limitations
- Inherits limitations of the Granite Tiny architecture
- Output quality may be lower than larger Granite variants
- Not fine-tuned for domain-specific or instruction-following tasks
License
This model is released under the Apache License 2.0. The original Granite model and associated intellectual property are owned by IBM.
Support
If you find this model useful, please consider supporting the project. Your support helps us continue releasing and maintaining high-quality open models. Support us with a heart.
- Downloads last month
- 1
Model tree for Open4bits/granite-4.0-h-tiny-f16
Base model
ibm-granite/granite-4.0-h-tiny
docker model run hf.co/Open4bits/granite-4.0-h-tiny-f16