Text Generation
Transformers
Safetensors
English
Chinese
granite
sft
thinking
html-card
full-finetune
conversational
Run this model with HF Jobs
Run wesjos/granite-4.2-3b-HTML on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/wesjos/granite-4.2-3b-HTML. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/wesjos/granite-4.2-3b-HTML on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/wesjos/granite-4.2-3b-HTML. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/wesjos/granite-4.2-3b-HTML. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use wesjos/granite-4.2-3b-HTML with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wesjos/granite-4.2-3b-HTML with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wesjos/granite-4.2-3b-HTML") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("wesjos/granite-4.2-3b-HTML") model = AutoModelForCausalLM.from_pretrained("wesjos/granite-4.2-3b-HTML", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wesjos/granite-4.2-3b-HTML with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wesjos/granite-4.2-3b-HTML" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wesjos/granite-4.2-3b-HTML", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wesjos/granite-4.2-3b-HTML
- SGLang
How to use wesjos/granite-4.2-3b-HTML 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 "wesjos/granite-4.2-3b-HTML" \ --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": "wesjos/granite-4.2-3b-HTML", "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 "wesjos/granite-4.2-3b-HTML" \ --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": "wesjos/granite-4.2-3b-HTML", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use wesjos/granite-4.2-3b-HTML with Docker Model Runner:
docker model run hf.co/wesjos/granite-4.2-3b-HTML
upload 12 files from /tmp/hf_stage
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785{ "add_prefix_space": false, "added_tokens_decoder": { "100256": { "content": "<|im_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100257": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100258": { "content": "<|fim_prefix|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100259": { "content": "<|fim_middle|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100260": { "content": "<|fim_suffix|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100261": { "content": "<|fim_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100262": { "content": "<|filename|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100263": { "content": "<|reponame|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100264": { "content": "<|unused_11|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100265": { "content": "<|unused_12|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100266": { "content": "<|unused_13|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100267": { "content": "<|unused_14|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100268": { "content": "<|unused_15|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100269": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100270": { "content": "<tool_call>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100271": { "content": "</tool_call>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100272": { "content": "<tool_response>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100273": { "content": "</tool_response>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100274": { "content": "<think>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100275": { "content": "</think>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "100276": { "content": "[INST]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100277": { "content": "[/INST]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100278": { "content": "[AVAILABLE_TOOLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100279": { "content": "[/AVAILABLE_TOOLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100280": { "content": "[TOOL_RESULTS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100281": { "content": "[/TOOL_RESULTS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100282": { "content": "[TOOL_CALLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100283": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100284": { "content": "</s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100285": { "content": "<|unused_16|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100286": { "content": "<|unused_17|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100287": { "content": "<|unused_18|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100288": { "content": "<|unused_19|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100289": { "content": "<|unused_20|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100290": { "content": "<|unused_21|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100291": { "content": "<|unused_22|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100292": { "content": "<|unused_23|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100293": { "content": "<|unused_24|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100294": { "content": "<|unused_25|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100295": { "content": "<|unused_26|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100296": { "content": "<|unused_27|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100297": { "content": "<|unused_28|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100298": { "content": "<|unused_29|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100299": { "content": "<|unused_30|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100300": { "content": "<|unused_31|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100301": { "content": "<|unused_32|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100302": { "content": "<|unused_33|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100303": { "content": "<|unused_34|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100304": { "content": "<|unused_35|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100305": { "content": "<|unused_36|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100306": { "content": "<|unused_37|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100307": { "content": "<|unused_38|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100308": { "content": "<|unused_39|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100309": { "content": "<|unused_40|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100310": { "content": "<|unused_41|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100311": { "content": "<|unused_42|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100312": { "content": "<|unused_43|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100313": { "content": "<|unused_44|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100314": { "content": "<|unused_45|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100315": { "content": "<|unused_46|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100316": { "content": "<|unused_47|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100317": { "content": "<|unused_48|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100318": { "content": "<|unused_49|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100319": { "content": "<|unused_50|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100320": { "content": "<|unused_51|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100321": { "content": "<|unused_52|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100322": { "content": "<|unused_53|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100323": { "content": "<|unused_54|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100324": { "content": "<|unused_55|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100325": { "content": "<|unused_56|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100326": { "content": "<|unused_57|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100327": { "content": "<|unused_58|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100328": { "content": "<|unused_59|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100329": { "content": "<|unused_60|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100330": { "content": "<|unused_61|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100331": { "content": "<|unused_62|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100332": { "content": "<|unused_63|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100333": { "content": "<|unused_64|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100334": { "content": "<|unused_65|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100335": { "content": "<|unused_66|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100336": { "content": "<|unused_67|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100337": { "content": "<|unused_68|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100338": { "content": "<|unused_69|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100339": { "content": "<|unused_70|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100340": { "content": "<|unused_71|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100341": { "content": "<|unused_72|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100342": { "content": "<|unused_73|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100343": { "content": "<|unused_74|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100344": { "content": "<|unused_75|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100345": { "content": "<|unused_76|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100346": { "content": "<|unused_77|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100347": { "content": "<|unused_78|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100348": { "content": "<|unused_79|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100349": { "content": "<|unused_80|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100350": { "content": "<|unused_81|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100351": { "content": "<|unused_82|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "backend": "tokenizers", "bos_token": "<s>", "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "errors": "replace", "extra_special_tokens": {}, "is_local": true, "model_max_length": 1000000000000000019884624838656, "pad_token": "<|im_end|>", "padding_side": "left", "tokenizer_class": "GPT2Tokenizer", "unk_token": "<unk>"}tokenizer_config.jsonAdded+785