anaksor-ocr
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Handles summaries, classification, extraction, question answering, RAG, code tasks and tool calling in 12 languages with a 340M-parameter instruct model from IBM. For developers who need a compact on-device model.
Granite-4.0-H-350M is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install torch torchvision torchaudio pip install accelerate pip install transformers
Granite-4.0-H-350M is a small instruct model from IBM's Granite Team. It was fine-tuned from the Granite-4.0-H-350M-Base model on permissively licensed open instruction data and IBM's own synthetic data. The methods included supervised fine-tuning, reinforcement learning and model merging. It targets on-device use and research.
It suits developers who want a compact multilingual model for everyday language tasks, and teams that plan to fine-tune a small model on their own domain without large compute.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Software | App developers | Run summaries and extraction on the user's device | Pulling fields out of a pasted email |
| Support | Help desk tool builders | Classify tickets and answer from retrieved text | Routing a ticket to the right queue |
| Engineering | Developer tool teams | Use code tasks and fill-in-the-middle completion | Completing a missing function body |
| Research | ML researchers | Fine-tune a small model for a specialized field | Adapting it to legal or medical wording |
Skip it if you need the depth of a large model, since 340M parameters limits what it can reason through.
| Use case | Who | What they get back |
|---|---|---|
| Summaries and extraction | App teams | Short summaries or fields pulled from text |
| RAG question answering | Search builders | Answers drawn from passages you supply |
| Tool calling | Agent developers | Function calls built from a tool list you define |
| Code completion | Editor plugin makers | Fill-in-the-middle suggestions |
You need these first.
pip install torch torchvision torchaudio pip install accelerate pip install transformers
pip install -U huggingface_hub hf download ibm-granite/granite-4.0-h-350m
Write a chat as a list of role and content messages, apply the chat template, tokenize and generate. Drop the device map if you run on CPU. For tool calling, you define your tools in the same schema that OpenAI uses for functions.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"
model_path = "ibm-granite/granite-4.0-h-350M"
tokenizer = AutoTokenizer.from_pretrained(model_path)
# drop device_map if running on CPU
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
model.eval()
# change input text as desired
chat = [
{ "role": "user", "content": "Please list one IBM Research laboratory located in the United States. You should only output its name and location." },
]
chat = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
# tokenize the text
input_tokens = tokenizer(chat, return_tensors="pt").to(device)
# generate output tokens
output = model.generate(**input_tokens,
max_new_tokens=100)
# decode output tokens into text
output = tokenizer.batch_decode(output)
# print output
print(output[0])| Tool | What it does |
|---|---|
| apply_chat_template | Formats your messages with the model's role markers |
| model.generate | Produces the reply, capped here at 100 new tokens |
| tools list | Describes functions the model can call, in the OpenAI function schema |
Ask for one IBM Research laboratory in the United States, name and location only. The printed output repeats the prompt with the role markers and then the reply. The card's expected output names the Almaden Research Center in San Jose, California.
If you are new, this is a small chat model you can run on a laptop. Start with the short Python script and change the question to your own. Keep tasks simple and short.
If you know the field, the card lists summarization, classification, extraction, question answering, RAG, code tasks, function calling, multilingual dialogue and fill-in-the-middle completions. It names 12 supported languages and says you can fine-tune it for others. Its tool calling uses the OpenAI function definition schema.
Handles summaries, classification, extraction, question answering, RAG, code tasks and tool calling in 12 languages with a 340M-parameter instruct model from IBM. For developers who need a compact on-device model.
Made by ibm-granite on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: Granite-4.0-H-350M is a small instruct model from IBM's Granite Team. It was fine-tuned from the Granite-4.0-H-350M-Base model on permissively licensed open instruction data and IBM's own synthetic data. The methods included supervised fine-tuning, reinforcement learning and model merging. It targets on-device use and research.
Who it suits: It suits developers who want a compact multilingual model for everyday language tasks, and teams that plan to fine-tune a small model on their own domain without large compute.
Industry | Who uses it | How they use it | Example
Software | App developers | Run summaries and extraction on the user's device | Pulling fields out of a pasted email
Support | Help desk tool builders | Classify tickets and answer from retrieved text | Routing a ticket to the right queue
Engineering | Developer tool teams | Use code tasks and fill-in-the-middle completion | Completing a missing function body
Research | ML researchers | Fine-tune a small model for a specialized field | Adapting it to legal or medical wording
Skip it if you need the depth of a large model, since 340M parameters limits what it can reason through.
Where to use it:
Use case | Who | What they get back
Summaries and extraction | App teams | Short summaries or fields pulled from text
RAG question answering | Search builders | Answers drawn from passages you supply
Tool calling | Agent developers | Function calls built from a tool list you define
Code completion | Editor plugin makers | Fill-in-the-middle suggestions
How to set it up: You need these first.
pip install torch torchvision torchaudio
pip install accelerate
pip install transformers
pip install -U huggingface_hub
hf download ibm-granite/granite-4.0-h-350m
How to use it: Write a chat as a list of role and content messages, apply the chat template, tokenize and generate. Drop the device map if you run on CPU. For tool calling, you define your tools in the same schema that OpenAI uses for functions.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"
model_path = "ibm-granite/granite-4.0-h-350M"
tokenizer = AutoTokenizer.from_pretrained(model_path)
# drop device_map if running on CPU
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
model.eval()
# change input text as desired
chat = [
{ "role": "user", "content": "Please list one IBM Research laboratory located in the United States. You should only output its name and location." },
]
chat = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
# tokenize the text
input_tokens = tokenizer(chat, return_tensors="pt").to(device)
# generate output tokens
output = model.generate(**input_tokens,
max_new_tokens=100)
# decode output tokens into text
output = tokenizer.batch_decode(output)
# print output
print(output[0])
Tool | What it does
apply_chat_template | Formats your messages with the model's role markers
model.generate | Produces the reply, capped here at 100 new tokens
tools list | Describes functions the model can call, in the OpenAI function schema
Example: Ask for one IBM Research laboratory in the United States, name and location only. The printed output repeats the prompt with the role markers and then the reply. The card's expected output names the Almaden Research Center in San Jose, California.
For newcomers and experts: If you are new, this is a small chat model you can run on a laptop. Start with the short Python script and change the question to your own. Keep tasks simple and short.
If you know the field, the card lists summarization, classification, extraction, question answering, RAG, code tasks, function calling, multilingual dialogue and fill-in-the-middle completions. It names 12 supported languages and says you can fine-tune it for others. Its tool calling uses the OpenAI function definition schema.
Granite-4.0-H-350M-Base
Supervised fine-tuning and RL
Model merging
Instruct model you load
Chat template builds your prompt
Good to know:
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download ibm-granite/granite-4.0-h-350m
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 6 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| Granite-4.0-H-350M This page | 4,734 | 114 | 340M | apache-2.0 | |
| Granite-4.2-3B (GGUF)Shares language · conversational · transformers | 276,584 | 47 | 3.7B | apache-2.0 | |
| granite-4.1-8b-GGUFShares language · conversational · transformers | 4,426 | 56 | 8.8B | apache-2.0 | |
| granite-4.2-8b GGUFShares language · conversational | 282,269 | 49 | 8.8B | apache-2.0 | |
| Qwen3-0.6BShares text-generation · conversational · transformers | 19,718,599 | 1,894 | 752M | apache-2.0 | |
| Qwen3-14BShares text-generation · conversational · transformers | 12,965,376 | 540 | 14.8B | apache-2.0 |
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Qwen · Kit
Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…
ACE-Step · Kit
Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.