Instructions to use DiTy/gemma-2-27b-it-function-calling-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DiTy/gemma-2-27b-it-function-calling-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DiTy/gemma-2-27b-it-function-calling-GGUF") 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("DiTy/gemma-2-27b-it-function-calling-GGUF") model = AutoModelForCausalLM.from_pretrained("DiTy/gemma-2-27b-it-function-calling-GGUF", 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
- llama.cpp
How to use DiTy/gemma-2-27b-it-function-calling-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 DiTy/gemma-2-27b-it-function-calling-GGUF:Q6_K # Run inference directly in the terminal: llama cli -hf DiTy/gemma-2-27b-it-function-calling-GGUF:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf DiTy/gemma-2-27b-it-function-calling-GGUF:Q6_K # Run inference directly in the terminal: llama cli -hf DiTy/gemma-2-27b-it-function-calling-GGUF:Q6_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 DiTy/gemma-2-27b-it-function-calling-GGUF:Q6_K # Run inference directly in the terminal: ./build/bin/llama cli -hf DiTy/gemma-2-27b-it-function-calling-GGUF:Q6_K
Use Docker
docker model run hf.co/DiTy/gemma-2-27b-it-function-calling-GGUF:Q6_K
- Llama new
- LM Studio
- Jan
- vLLM
How to use DiTy/gemma-2-27b-it-function-calling-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DiTy/gemma-2-27b-it-function-calling-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DiTy/gemma-2-27b-it-function-calling-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DiTy/gemma-2-27b-it-function-calling-GGUF:Q6_K
- SGLang
How to use DiTy/gemma-2-27b-it-function-calling-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 "DiTy/gemma-2-27b-it-function-calling-GGUF" \ --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": "DiTy/gemma-2-27b-it-function-calling-GGUF", "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 "DiTy/gemma-2-27b-it-function-calling-GGUF" \ --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": "DiTy/gemma-2-27b-it-function-calling-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use DiTy/gemma-2-27b-it-function-calling-GGUF with Ollama:
ollama run hf.co/DiTy/gemma-2-27b-it-function-calling-GGUF:Q6_K
- Unsloth Desktop
- Docker Model Runner
How to use DiTy/gemma-2-27b-it-function-calling-GGUF with Docker Model Runner:
docker model run hf.co/DiTy/gemma-2-27b-it-function-calling-GGUF:Q6_K
- Lemonade
How to use DiTy/gemma-2-27b-it-function-calling-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull DiTy/gemma-2-27b-it-function-calling-GGUF:Q6_K
Run and chat with the model
lemonade run user.gemma-2-27b-it-function-calling-GGUF-Q6_K
List all available models
lemonade list
- Atomic Chat
Finetuning possible?
Hi!
Attempting to use this model for a specific use case in nutrition. Just wondering is further finetuning on this model possible?
Hey, I'm not sure if I understand you correctly.
- If you mean calls to specific functions related to the nutrition domain, then you do not need to fine-tune anything further. I have specially trained the model so that you can use any functions with any domains.
- But if you mean additional fine-tuning this model on specific domain (data about nutriton), it is quite possible that you will find yourself at an unpleasant crossroads with catastrophically forgetting about the tasks of the model that I have trained.
In this model finetuning I have used limited number of data (no more than 200 examples) and LoRa with only 1 epoch of training.
I hope this answers your question.
Just realising my question wasn't very clear. Yes, I meant additional finetuning. Thank you for the quick response!