# Gorilla: Large Language Model Connected with Massive APIs [[Project Website](https://shishirpatil.github.io/gorilla/)]
<img src="https://github.com/ShishirPatil/gorilla/blob/gh-pages/assets/img/logo.png" width=50% height=50%>
**:fire: Gorilla OpenFunctions** is a drop-in alternative for function calling! [Release Blog](https://gorilla.cs.berkeley.edu/blogs/4_open_functions.html)
**🟢 Gorilla is Apache 2.0** With Gorilla being fine-tuned on MPT, and Falcon, you can use Gorilla commercially with no obligations! :golf:
**:rocket: Try Gorilla in 60s** [](https://colab.research.google.com/drive/1DEBPsccVLF_aUnmD0FwPeHFrtdC0QIUP?usp=sharing)
:computer: Use [Gorilla in your CLI](https://github.com/gorilla-llm/gorilla-cli) with `pip install gorilla-cli`
**:newspaper_roll: Checkout our paper!** [](https://arxiv.org/abs/2305.15334)
**:wave: Join our Discord!** [](https://discord.gg/SwTyuTAxX3)
`Gorilla` enables LLMs to use tools by invoking APIs. Given a natural language query, Gorilla comes up with the semantically- and syntactically- correct API to invoke. With Gorilla, we are the first to demonstrate how to use LLMs to invoke 1,600+ (and growing) API calls accurately while reducing hallucination. We also release APIBench, the largest collection of APIs, curated and easy to be trained on! Join us, as we try to expand the largest API store and teach LLMs how to write them! Hop on our Discord, or open a PR, or email us if you would like to have your API incorporated as well.
## News
- :fire: [11/16] Excited to release [Gorilla OpenFunctions](https://gorilla.cs.berkeley.edu/blogs/4_open_functions.html)
- 💻 [06/29] Released [gorilla-cli](https://github.com/gorilla-llm/gorilla-cli), LLMs for your CLI!
- 🟢 [06/06] Released Commercially usable, Apache 2.0 licensed Gorilla models
- :rocket: [05/30] Provided the [CLI interface](inference/README.md) to chat with Gorilla!
- :rocket: [05/28] Released Torch Hub and TensorFlow Hub Models!
- :rocket: [05/27] Released the first Gorilla model! [](https://colab.research.google.com/drive/1DEBPsccVLF_aUnmD0FwPeHFrtdC0QIUP?usp=sharing) or [:hugs:](https://huggingface.co/gorilla-llm/gorilla-7b-hf-delta-v0)!
- :fire: [05/27] We released the APIZoo contribution guide for community API contributions!
- :fire: [05/25] We release the APIBench dataset and the evaluation code of Gorilla!
## Gorilla Gradio
**Try Gorilla LLM models in [HF Spaces](https://huggingface.co/spaces/gorilla-llm/gorilla-demo/) or [](https://colab.research.google.com/drive/1ktnVWPJOgqTC9hLW8lJPVZszuIddMy7y?usp=sharing)**

## Get Started
Inference: Run Gorilla locally [`inference/README.md`](inference/README.md)
Evaluation: We have included prompts and responses for the APIBench with and without retrievers along with the Abstract Syntax Tree (AST) matching evaluation script at [evaluation](https://github.com/ShishirPatil/gorilla/tree/main/eval).
## Repository Organization
Our repository organization is shown below.
- The `data` folder contains all the evaluation APIs `(APIBench)` and the community contributed APIs.
- The `eval` folder contains all our evaluation code as well as the Gorilla outputs.
- The `inference` folder contains all the inference code for running Gorilla locally.
- <span style="color:hr">[Coming Soon!]</span> The `train` folder contains all the training code associated with Gorilla finetuning.
For our dataset collections, all the 1640 API documentation is in `data/api`. We also include the `APIBench` dataset created by self-instruct in `data/apibench`. For evaluation, we convert this into a LLM-friendly chat format, and the questions are in `eval/eval-data/questions`, and the corresponding responses are in `eval/eval-data/responses`. We have also included the evaluation scripts are in `eval/eval-scripts`. This would be entirely sufficient to train Gorilla yourself, and reproduce our results. Please see [evaluation](https://github.com/ShishirPatil/gorilla/tree/main/eval) for the details on how to use our evaluation pipeline.
Additionally, we have released all the model weights. `gorilla-7b-hf-v0` lets you invoke over 925 Hugging Face APIs. Similarly, `gorilla-7b-tf-v0` and `gorilla-7b-th-v0` have 626 (exhaustive) Tensorflow v2, and 94 (exhaustive) Torch Hub APIs. `gorilla-mpt-7b-hf-v0` and `gorilla-falcon-7b-hf-v0` are Apache 2.0 licensed models (commercially usable) fine-tuned on MPT-7B and Falcon-7B respectively. We will release a model with all three combined with generic chat capability and community contributed APIs as soon as we can scale our serving infrastructure. You can run Gorilla locally from instructions in the `inference/` sub-directory, or we also provide a hosted Gorilla chat completion API (see Colab)! If you have any suggestions, or if you run into any issues please feel free to reach out to us either through Discord or email or raise a Github issue.
```
gorilla
├── data
│ ├── api (TF/HF/TH APIs used in generating apibench)
│ │ ├── {api_name}_api.jsonl
│ ├── apibench (Evaluating LLM models) v-1.0
│ │ ├── {api_name}_train.jsonl, {api_name}_eval.jsonl
| |── apizoo (Contributed by the community - evolving)
│ | ├── username1.json
│ │ ├── username2.json
│ │ ├── ...
├── eval
│ ├── README.md
│ ├── get_llm_responses.py
│ ├── eval-scripts
│ │ ├── ast_eval_{api_name}.py
│ ├── eval-data
│ │ ├── questions
│ │ │ ├── API name
│ │ │ │ ├── questions_{api_name}_{eval_metric}.jsonl
│ │ ├── responses
│ │ │ ├── API name
│ │ │ │ ├── responses_{api_name}_Gorilla_FT_{eval_metric}.jsonl
│ │ │ │ ├── responses_{api_name}_Gorilla_RT_{eval_metric}.jsonl
├── inference
│ ├── README.md
│ ├── serve
│ │ ├── gorilla_cli.py
│ │ ├── conv_template.py
├── train (Coming Soon!)
```
## Contributing Your API
We aim to build an open-source, one-stop-shop for all APIs, LLMs can interact with! Any suggestions and contributions are welcome! Please see the details on [how to contribute](https://github.com/ShishirPatil/gorilla/tree/main/data/README.md). THIS WILL ALWAYS REMAIN OPEN SOURCE.
## FAQ(s)
1. I would like to use Gorilla commercially. Is there going to be a Apache 2.0 licensed version?
Yes! We now have models that you can use commercially without any obligations.
2. Can we use Gorilla with Langchain, Toolformer, AutoGPT etc?
Absolutely! You've highlighted a great aspect of our tools. Gorilla is an end-to-end model, specifically tailored to serve correct API calls without requiring any additional coding. It's designed to work as part of a wider ecosystem and can be flexibly integrated with other tools.
Langchain, is a versatile developer tool. Its "agents" can efficiently swap in any LLM, Gorilla included, making it a highly adaptable solution for various needs.
AutoGPT, on the other hand, concentrates on the art of prompting GPT series models. It's worth noting that Gorilla, as a fully fine-tuned model, consistently shows remarkable accuracy, and lowers hallucination, outperforming GPT-4 in making specific API calls.
Now, when it comes to ToolFormer, Toolformer zeroes in on a select set of tools, providing specialized functionalities. Gorilla, in
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
一个强大的LLM(Language and Learning Model),它提供适当的API调用,经过在多个大型机器学习中心数据集上的训练。它的性能优越,特别是在零样本学习(Zero-shot)方面。对于需要强大自然语言处理能力的开发者和研究人员,Gorilla是一个有价值的模型。
资源推荐
资源详情
资源评论
























收起资源包目录





































































































共 138 条
- 1
- 2
资源评论

- 2301_789664452024-07-27资源内容详实,描述详尽,解决了我的问题,受益匪浅,学到了。

UnknownToKnown
- 粉丝: 1w+
- 资源: 782
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 流浪动物救助网站(源码+数据库+论文+ppt)java开发springboot框架javaweb,可做计算机毕业设计或课程设计
- 二手物品交易网站(源码+数据库+论文)java开发springboot框架javaweb,可做计算机毕业设计或课程设计
- 基于Python的数据仓库设计与宁波景点情感分析源码
- 房屋租赁服务平台(源码+数据库+论文+ppt)java开发springboot框架javaweb,可做计算机毕业设计或课程设计
- nku密码学基础+现代密码学实验.zip
- 基于机器学习的webshell检测算法.zip
- 基于Flask Web设计的中文自动语音识别演示系统,包含语音识别、语音合成、声纹识别之说话人识别。.zip
- 基于卷积神经网络的数字手势识别安卓APP,识别数字手势0-10.zip
- 基于孪生神经网络实现的点选识别算法源码+说明.zip
- 基于人工智能的中医图像分类算法源码(中药的人工智能图像分类系统).zip
- 清华大学Deepek第4弹:《Deepek DeepRearch:让科研像聊天一样简单》.pdf
- 基于HTML5设计的旅游网.zip
- 数据采集系统APP.zip
- Comsol等离子体仿真:探究Ar棒板粗通道流注放电的电子密度、电子温度与电场强度特性(基于5.5与6.0版本),基于Comsol等离子体仿真的AR棒板粗通道流注放电特性研究:涉及电子密度、电子温度、
- 学生管理平台网页端
- 基于Java_SSM框架的博物馆智能科普系统设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
