๐ LLM Engineer's Handbook
Collection
Models and datasets from my book. All the code is freely available at https://github.com/PacktPublishing/LLM-Engineers-Handbook โข 6 items โข Updated โข 17
How to use mlabonne/TwinLlama-3.1-8B-DPO-GGUF with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("mlabonne/TwinLlama-3.1-8B-DPO-GGUF", device_map="auto")How to use mlabonne/TwinLlama-3.1-8B-DPO-GGUF with llama.cpp:
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0
# 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 mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0
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 mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0
docker model run hf.co/mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0
How to use mlabonne/TwinLlama-3.1-8B-DPO-GGUF with Ollama:
ollama run hf.co/mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0
How to use mlabonne/TwinLlama-3.1-8B-DPO-GGUF with Docker Model Runner:
docker model run hf.co/mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0
How to use mlabonne/TwinLlama-3.1-8B-DPO-GGUF with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mlabonne/TwinLlama-3.1-8B-DPO-GGUF:Q8_0
lemonade run user.TwinLlama-3.1-8B-DPO-GGUF-Q8_0
lemonade list
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
8-bit