glaiveai/glaive-function-calling-v2
Viewer • Updated • 113k • 63.2k • 508
How to use cfahlgren1/natural-functions-GGUF with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("cfahlgren1/natural-functions-GGUF", dtype="auto")How to use cfahlgren1/natural-functions-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="cfahlgren1/natural-functions-GGUF", filename="natural-functions.Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
How to use cfahlgren1/natural-functions-GGUF with llama.cpp:
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf cfahlgren1/natural-functions-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf cfahlgren1/natural-functions-GGUF:Q4_K_M
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf cfahlgren1/natural-functions-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf cfahlgren1/natural-functions-GGUF:Q4_K_M
# 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 cfahlgren1/natural-functions-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf cfahlgren1/natural-functions-GGUF:Q4_K_M
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 cfahlgren1/natural-functions-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf cfahlgren1/natural-functions-GGUF:Q4_K_M
docker model run hf.co/cfahlgren1/natural-functions-GGUF:Q4_K_M
How to use cfahlgren1/natural-functions-GGUF with Ollama:
ollama run hf.co/cfahlgren1/natural-functions-GGUF:Q4_K_M
How to use cfahlgren1/natural-functions-GGUF with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for cfahlgren1/natural-functions-GGUF to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for cfahlgren1/natural-functions-GGUF to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for cfahlgren1/natural-functions-GGUF to start chatting
How to use cfahlgren1/natural-functions-GGUF with Docker Model Runner:
docker model run hf.co/cfahlgren1/natural-functions-GGUF:Q4_K_M
How to use cfahlgren1/natural-functions-GGUF with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull cfahlgren1/natural-functions-GGUF:Q4_K_M
lemonade run user.natural-functions-GGUF-Q4_K_M
lemonade list
Mistral-7B finetuned for Function Calling
ollama run calebfahlgren/natural-functions
You are a helpful assistant with access to the following functions. Use them if required -
{
"name": "create_event",
"description": "Create a new event in the calendar",
"parameters": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the event"
},
"date": {
"type": "string",
"format": "date",
"description": "The date of the event"
},
"time": {
"type": "string",
"format": "time",
"description": "The time of the event"
},
"location": {
"type": "string",
"description": "The location of the event (optional)"
}
},
"required": [
"title",
"date",
"time"
]
}
}
You are a helpful assistant with access to the following functions. Use them if required
{
"name": "calculate_shipping_cost",
"description": "Calculate the shipping cost for a package",
"parameters": {
"type": "object",
"properties": {
"weight": {
"type": "number",
"description": "The weight of the package in kilograms"
},
"destination": {
"type": "string",
"description": "The destination address"
}
},
"required": [
"weight",
"destination"
]
}
}
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit