Instructions to use de-coder/UlizaLlama_Q4_K_M-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use de-coder/UlizaLlama_Q4_K_M-gguf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="de-coder/UlizaLlama_Q4_K_M-gguf")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("de-coder/UlizaLlama_Q4_K_M-gguf") model = AutoModelForCausalLM.from_pretrained("de-coder/UlizaLlama_Q4_K_M-gguf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use de-coder/UlizaLlama_Q4_K_M-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 de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M
Use Docker
docker model run hf.co/de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use de-coder/UlizaLlama_Q4_K_M-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "de-coder/UlizaLlama_Q4_K_M-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "de-coder/UlizaLlama_Q4_K_M-gguf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M
- SGLang
How to use de-coder/UlizaLlama_Q4_K_M-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 "de-coder/UlizaLlama_Q4_K_M-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": "de-coder/UlizaLlama_Q4_K_M-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 "de-coder/UlizaLlama_Q4_K_M-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": "de-coder/UlizaLlama_Q4_K_M-gguf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use de-coder/UlizaLlama_Q4_K_M-gguf with Ollama:
ollama run hf.co/de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use de-coder/UlizaLlama_Q4_K_M-gguf with Docker Model Runner:
docker model run hf.co/de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M
- Lemonade
How to use de-coder/UlizaLlama_Q4_K_M-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull de-coder/UlizaLlama_Q4_K_M-gguf:Q4_K_M
Run and chat with the model
lemonade run user.UlizaLlama_Q4_K_M-gguf-Q4_K_M
List all available models
lemonade list
- Atomic Chat
| { | |
| "_name_or_path": "de-coder/UlizaLlama_Q4_K_M-gguf", | |
| "architectures": ["LlamaForCausalLM"], | |
| "model_type": "llama", | |
| "torch_dtype": "float16", | |
| "transformers_version": "4.34.0", | |
| "vocab_size": 20000, | |
| "hidden_size": 4096, | |
| "intermediate_size": 11008, | |
| "num_hidden_layers": 32, | |
| "num_attention_heads": 32, | |
| "num_key_value_heads": 32, | |
| "hidden_act": "silu", | |
| "max_position_embeddings": 4096, | |
| "initializer_range": 0.02, | |
| "rms_norm_eps": 1e-05, | |
| "rope_theta": 10000.0, | |
| "rope_scaling": null, | |
| "attention_bias": false, | |
| "use_cache": true, | |
| "tie_word_embeddings": false, | |
| "bos_token_id": 1, | |
| "eos_token_id": 2, | |
| "pad_token_id": 0, | |
| "unk_token_id": 0, | |
| "quantization": { | |
| "method": "GGUF", | |
| "bits": 4, | |
| "variant": "q4_0", | |
| "block_size": 32, | |
| "group_size": 32, | |
| "tensors": { | |
| "query": "Q4_0", | |
| "key": "Q4_0", | |
| "value": "Q4_0", | |
| "output": "Q4_0", | |
| "intermediate": "Q4_0", | |
| "gate": "Q4_0", | |
| "embedding": "Q4_0", | |
| "norm": "F16" | |
| }, | |
| "scales_dtype": "fp16" | |
| }, | |
| "tokenizer": { | |
| "type": "BPE", | |
| "vocab_file": "ulizallama-tokenizer.json", | |
| "merges_file": "ulizallama-merges.txt" | |
| }, | |
| "generation": { | |
| "temperature": 0.7, | |
| "top_p": 0.95, | |
| "top_k": 40, | |
| "repetition_penalty": 1.1, | |
| "max_new_tokens": 512 | |
| }, | |
| "base_model": { | |
| "name": "Jacaranda/kiswallama-pretrained", | |
| "type": "Llama2 Continual Pretraining" | |
| }, | |
| "quantization_process": { | |
| "library": "llama.cpp", | |
| "version": "1.0.0", | |
| "command": "llama.cpp quantize ulizallama-7b.gguf ulizallama-7b-gguf-q4_0.bin q4_0" | |
| } | |
| } |