Instructions to use RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf", filename="CodeActAgent-Llama-2-7b.IQ3_M.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 RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-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 RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-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 RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-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 RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-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 RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf:Q4_K_M
Use Docker
docker model run hf.co/RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf with Ollama:
ollama run hf.co/RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf:Q4_K_M
- Unsloth Studio new
How to use RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-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 RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-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 RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-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 RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf to start chatting
- Docker Model Runner
How to use RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf with Docker Model Runner:
docker model run hf.co/RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf:Q4_K_M
- Lemonade
How to use RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RichardErkhov/xingyaoww_-_CodeActAgent-Llama-2-7b-gguf:Q4_K_M
Run and chat with the model
lemonade run user.xingyaoww_-_CodeActAgent-Llama-2-7b-gguf-Q4_K_M
List all available models
lemonade list
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Quantization made by Richard Erkhov.
CodeActAgent-Llama-2-7b - GGUF
- Model creator: https://huggingface.co/xingyaoww/
- Original model: https://huggingface.co/xingyaoww/CodeActAgent-Llama-2-7b/
Original model description:
license: llama2 datasets: - xingyaoww/code-act language: - en tags: - llm-agent pipeline_tag: text-generation
Executable Code Actions Elicit Better LLM Agents
π» Code β’ π Paper β’ π€ Data (CodeActInstruct) β’ π€ Model (CodeActAgent-Mistral-7b-v0.1) β’ π€ Chat with CodeActAgent!
We propose to use executable Python code to consolidate LLM agentsβ actions into a unified action space (CodeAct). Integrated with a Python interpreter, CodeAct can execute code actions and dynamically revise prior actions or emit new actions upon new observations (e.g., code execution results) through multi-turn interactions.
Why CodeAct?
Our extensive analysis of 17 LLMs on API-Bank and a newly curated benchmark M3ToolEval shows that CodeAct outperforms widely used alternatives like Text and JSON (up to 20% higher success rate). Please check our paper for more detailed analysis!
Comparison between CodeAct and Text / JSON as action.
Quantitative results comparing CodeAct and {Text, JSON} on M3ToolEval.
π CodeActInstruct
We collect an instruction-tuning dataset CodeActInstruct that consists of 7k multi-turn interactions using CodeAct. Dataset is release at huggingface dataset π€. Please refer to the paper and this section for details of data collection.
Dataset Statistics. Token statistics are computed using Llama-2 tokenizer.
πͺ CodeActAgent
Trained on CodeActInstruct and general conversaions, CodeActAgent excels at out-of-domain agent tasks compared to open-source models of the same size, while not sacrificing generic performance (e.g., knowledge, dialog). We release two variants of CodeActAgent:
- CodeActAgent-Mistral-7b-v0.1 (recommended, model link): using Mistral-7b-v0.1 as the base model with 32k context window.
- CodeActAgent-Llama-7b (model link): using Llama-2-7b as the base model with 4k context window.
Evaluation results for CodeActAgent. ID and OD stand for in-domain and out-of-domain evaluation correspondingly. Overall averaged performance normalizes the MT-Bench score to be consistent with other tasks and excludes in-domain tasks for fair comparison.
Please check out our paper and code for more details about data collection, model training, and evaluation.
π Citation
@misc{wang2024executable,
title={Executable Code Actions Elicit Better LLM Agents},
author={Xingyao Wang and Yangyi Chen and Lifan Yuan and Yizhe Zhang and Yunzhu Li and Hao Peng and Heng Ji},
year={2024},
eprint={2402.01030},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
- Downloads last month
- 185
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
