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
Keep Q2_K/Q3_K_M gguf only
Browse filesFiles changed (3)
- granite-8b-code-base-4k-Q3_K_L.ggufDeleted-3
- granite-8b-code-base-4k-Q3_K_S.ggufDeleted-3
- granite-8b-code-base-4k-Q4_K_M.ggufDeleted-3
123version https://git-lfs.github.com/spec/v1oid sha256:0882bb368e8dd54c988fd668c82a2a11da39733467d01cf03dbc4eabcf01ca70size 4287724832123version https://git-lfs.github.com/spec/v1oid sha256:7569da2522ef51b9bb2fad9c8e160c9525e5c5f4ccc1dddf56dd0642abc35ca0size 3548085536123version https://git-lfs.github.com/spec/v1oid sha256:94bca484c67e8e2379fcc6aeb8d714036c3f40af593c8c0e39f1d43b8b813cccsize 4882857248granite-8b-code-base-4k-Q3_K_L.ggufDeleted-3
granite-8b-code-base-4k-Q3_K_S.ggufDeleted-3
granite-8b-code-base-4k-Q4_K_M.ggufDeleted-3