Run this model with HF Jobs
Run tensorblock/granite-8b-code-base-4k-GGUF 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/tensorblock/granite-8b-code-base-4k-GGUF. 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/tensorblock/granite-8b-code-base-4k-GGUF 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/tensorblock/granite-8b-code-base-4k-GGUF. 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.
Instructions to use tensorblock/granite-8b-code-base-4k-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/granite-8b-code-base-4k-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/granite-8b-code-base-4k-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/granite-8b-code-base-4k-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use tensorblock/granite-8b-code-base-4k-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf tensorblock/granite-8b-code-base-4k-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf tensorblock/granite-8b-code-base-4k-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf tensorblock/granite-8b-code-base-4k-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf tensorblock/granite-8b-code-base-4k-GGUF:Q2_K
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf tensorblock/granite-8b-code-base-4k-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama cli -hf tensorblock/granite-8b-code-base-4k-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/granite-8b-code-base-4k-GGUF:Q2_K
- Llama new
- LM Studio
- Jan
- vLLM
How to use tensorblock/granite-8b-code-base-4k-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/granite-8b-code-base-4k-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/granite-8b-code-base-4k-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tensorblock/granite-8b-code-base-4k-GGUF:Q2_K
- SGLang
How to use tensorblock/granite-8b-code-base-4k-GGUF 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 "tensorblock/granite-8b-code-base-4k-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/granite-8b-code-base-4k-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "tensorblock/granite-8b-code-base-4k-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/granite-8b-code-base-4k-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use tensorblock/granite-8b-code-base-4k-GGUF with Ollama:
ollama run hf.co/tensorblock/granite-8b-code-base-4k-GGUF:Q2_K
- Unsloth Desktop
- Docker Model Runner
How to use tensorblock/granite-8b-code-base-4k-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/granite-8b-code-base-4k-GGUF:Q2_K
- Lemonade
How to use tensorblock/granite-8b-code-base-4k-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/granite-8b-code-base-4k-GGUF:Q2_K
Run and chat with the model
lemonade run user.granite-8b-code-base-4k-GGUF-Q2_K
List all available models
lemonade list
- Atomic Chat
Remove gguf quant files (Q4/Q5/Q6/Q8 variants)
Browse filesFiles changed (7)
- granite-8b-code-base-4k-Q4_0.ggufDeleted-3
- granite-8b-code-base-4k-Q4_K_S.ggufDeleted-3
- granite-8b-code-base-4k-Q5_0.ggufDeleted-3
- granite-8b-code-base-4k-Q5_K_M.ggufDeleted-3
- granite-8b-code-base-4k-Q5_K_S.ggufDeleted-3
- granite-8b-code-base-4k-Q6_K.ggufDeleted-3
- granite-8b-code-base-4k-Q8_0.ggufDeleted-3
123version https://git-lfs.github.com/spec/v1oid sha256:6d70d6959e0b8b8bf15cd7f9ed81ca6bd8dbbd32f9926efaf12999b7db0b0311size 4590894368123version https://git-lfs.github.com/spec/v1oid sha256:59559852699a88dcd4655d8a18e9522927e6dcbbb36fe8043ea2b29e71c68b53size 4622351648123version https://git-lfs.github.com/spec/v1oid sha256:bc7ecb09d8925efb2a2f209f89f3719a8d338b04a107799142256ef8fc79a34bsize 5572361504123version https://git-lfs.github.com/spec/v1oid sha256:6c110d4cfe0a0dbaa5331857f74834654e77a8ad2b38b75c482dcb9939792fedsize 5722766624123version https://git-lfs.github.com/spec/v1oid sha256:d0c07ccecc94fc68b0a3a0fbbadf8eb72bba9913cec6f77f815b6dcdcd3452b1size 5572361504123version https://git-lfs.github.com/spec/v1oid sha256:ef6a558a2d3818a3db1c3119cea6a1a3ea17fe82b6fcfc32118c56f51e81e0e8size 6615170336123version https://git-lfs.github.com/spec/v1oid sha256:72f61de4c1c5d463d77102953e937365df5c7cb2484bb7da15d46ad03949c139size 8565521696granite-8b-code-base-4k-Q4_0.ggufDeleted-3
granite-8b-code-base-4k-Q4_K_S.ggufDeleted-3
granite-8b-code-base-4k-Q5_0.ggufDeleted-3
granite-8b-code-base-4k-Q5_K_M.ggufDeleted-3
granite-8b-code-base-4k-Q5_K_S.ggufDeleted-3
granite-8b-code-base-4k-Q6_K.ggufDeleted-3
granite-8b-code-base-4k-Q8_0.ggufDeleted-3