Instructions to use QuantFactory/TinyAgent-7B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/TinyAgent-7B-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/TinyAgent-7B-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/TinyAgent-7B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/TinyAgent-7B-GGUF", filename="TinyAgent-7B.Q2_K.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/TinyAgent-7B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/TinyAgent-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/TinyAgent-7B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/TinyAgent-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/TinyAgent-7B-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 QuantFactory/TinyAgent-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/TinyAgent-7B-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 QuantFactory/TinyAgent-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/TinyAgent-7B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/TinyAgent-7B-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use QuantFactory/TinyAgent-7B-GGUF with Ollama:
ollama run hf.co/QuantFactory/TinyAgent-7B-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/TinyAgent-7B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
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 QuantFactory/TinyAgent-7B-GGUF to start chatting
Install Unsloth Studio (Windows)
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 QuantFactory/TinyAgent-7B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/TinyAgent-7B-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/TinyAgent-7B-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/TinyAgent-7B-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/TinyAgent-7B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/TinyAgent-7B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.TinyAgent-7B-GGUF-Q4_K_M
List all available models
lemonade list
QuantFactory/TinyAgent-7B-GGUF
This is quantized version of squeeze-ai-lab/TinyAgent-7B created using llama.cpp
Original Model Card
TinyAgent: Function Calling at the Edge
Get the desktop appโ โ | Read the blog post
TinyAgent aims to enable complex reasoning and function calling capabilities in Small Language Models (SLMs) that can be deployed securely and privately at the edge. Traditional Large Language Models (LLMs) like GPT-4 and Gemini-1.5, while powerful, are often too large and resource-intensive for edge deployment, posing challenges in terms of privacy, connectivity, and latency. TinyAgent addresses these challenges by training specialized SLMs with high-quality, curated data, and focusing on function calling with LLMCompiler. As a driving application, TinyAgent can interact with various MacOS applications, assisting users with day-to-day tasks such as composing emails, managing contacts, scheduling calendar events, and organizing Zoom meetings.
Model Developers: Squeeze AI Lab at University of California, Berkeley.
Variations: TinyAgent models come in 2 sizes: TinyAgent-1.1B and TinyAgent-7B
License: MIT
Demo
How to Use
Please see our Github for details on how to use TinyAgent models. TinyAgent models can be used programmatically or through our user interface.
Training Details
Dataset: We curated a dataset of 40,000 real-life use cases. We use GPT-3.5-Turbo to generate real-world instructions. These are then used to obtain synthetic execution plans using GPT-4-Turbo. Please check out our blog post for more details on our dataset.
Fine-tuning Procedure: TinyAgent models are fine-tuned from base models. Below is a table of each TinyAgent model with its base counterpart
| Model | Success Rate |
|---|---|
| GPT-3.5-turbo | 65.04% |
| GPT-4-turbo | 79.08% |
| TinyLLama-1.1B-32K-Instruct | 12.71% |
| WizardLM-2-7b | 41.25% |
| TinyAgent-1.1B + ToolRAG / [hf] [gguf] | 80.06% |
| TinyAgent-7B + ToolRAG / [hf] [gguf] | 84.95% |
Using the synthetic data generation process described above, we use parameter-efficient fine-tuning with LoRA to fine-tune the base models for 3 epochs. Please check out our blog post for more details on our fine-tuning procedure.
๐ ๏ธ ToolRAG
When faced with challenging tasks, SLM agents require appropriate tools and in-context examples to guide them. If the model sees irrelevant examples, it can hallucinate. Likewise, if the model sees the descriptions of the tools that it doesnโt need, it usually gets confused, and these tools take up unnecessary prompt space. To tackle this, TinyAgent uses ToolRAG to retrieve the best tools and examples suited for a given query. This process has minimal latency and increases the accuracy of TinyAgent substantially. Please take a look at our blog post and our ToolRAG model for more details.
Links
Blog Post: https://bair.berkeley.edu/blog/2024/05/29/tiny-agent/
- Downloads last month
- 212
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit

# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/TinyAgent-7B-GGUF", dtype="auto")