tomasmcm / gorilla-openfunctions-v1

Source: gorilla-llm/gorilla-openfunctions-v1 ✦ Quant: TheBloke/gorilla-openfunctions-v1-AWQ ✦ Extend Large Language Model (LLM) Chat Completion feature to formulate executable APIs call given natural language instructions and API context

replicate.com
Total runs: 416
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: November 25 2023

Introduction of gorilla-openfunctions-v1

Model Details of gorilla-openfunctions-v1

Readme

🚀 Try it out on Colab
📣 Read more in our OpenFunctions blog release

Introduction

Gorilla OpenFunctions extends Large Language Model(LLM) Chat Completion feature to formulate executable APIs call given natural language instructions and API context.

Models Available
model functionality
gorilla-openfunctions-v0 Given a function, and user intent, returns properly formatted json with the right arguments
gorilla-openfunctions-v1 + Parallel functions, and can choose between functions
Example Usage (Hosted)
  1. OpenFunctions is compatible with OpenAI Functions
!pip install openai==0.28.1
  1. Point to Gorilla hosted servers
import openai

def get_gorilla_response(prompt="Call me an Uber ride type \"Plus\" in Berkeley at zipcode 94704 in 10 minutes", model="gorilla-openfunctions-v0", functions=[]):
  openai.api_key = "EMPTY"
  openai.api_base = "http://luigi.millennium.berkeley.edu:8000/v1"
  try:
    completion = openai.ChatCompletion.create(
      model="gorilla-openfunctions-v1",
      temperature=0.0,
      messages=[{"role": "user", "content": prompt}],
      functions=functions,
    )
    return completion.choices[0].message.content
  except Exception as e:
    print(e, model, prompt)
  1. Pass the user argument and set of functions, Gorilla OpenFunctions returns a fully formatted json
query = "Call me an Uber ride type \"Plus\" in Berkeley at zipcode 94704 in 10 minutes"
functions = [
    {
        "name": "Uber Carpool",
        "api_name": "uber.ride",
        "description": "Find suitable ride for customers given the location, type of ride, and the amount of time the customer is willing to wait as parameters",
        "parameters":  [{"name": "loc", "description": "location of the starting place of the uber ride"}, {"name":"type", "enum": ["plus", "comfort", "black"], "description": "types of uber ride user is ordering"}, {"name": "time", "description": "the amount of time in minutes the customer is willing to wait"}]
    }
]
get_gorilla_response(query, functions=functions)
  1. Expected output
uber.ride(loc="berkeley", type="plus", time=10)
Example Usage (Run Locally)
import json
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline

def get_prompt(user_query: str, functions: list = []) -> str:
    """
    Generates a conversation prompt based on the user's query and a list of functions.

    Parameters:
    - user_query (str): The user's query.
    - functions (list): A list of functions to include in the prompt.

    Returns:
    - str: The formatted conversation prompt.
    """
    if len(functions) == 0:
        return f"USER: <<question>> {user_query}\nASSISTANT: "
    functions_string = json.dumps(functions)
    return f"USER: <<question>> {user_query} <<function>> {functions_string}\nASSISTANT: "

# Device setup
device : str = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32

# Model and tokenizer setup
model_id : str = "gorilla-llm/gorilla-openfunctions-v1"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True)

# Move model to device
model.to(device)

# Pipeline setup
pipe = pipeline(
    "text-generation",
    model=model,
    tokenizer=tokenizer,
    max_new_tokens=128,
    batch_size=16,
    torch_dtype=torch_dtype,
    device=device,
)

# Example usage
query: str = "Call me an Uber ride type \"Plus\" in Berkeley at zipcode 94704 in 10 minutes"
functions = [
    {
        "name": "Uber Carpool",
        "api_name": "uber.ride",
        "description": "Find suitable ride for customers given the location, type of ride, and the amount of time the customer is willing to wait as parameters",
        "parameters":  [
            {"name": "loc", "description": "Location of the starting place of the Uber ride"},
            {"name": "type", "enum": ["plus", "comfort", "black"], "description": "Types of Uber ride user is ordering"},
            {"name": "time", "description": "The amount of time in minutes the customer is willing to wait"}
        ]
    }
]

# Generate prompt and obtain model output
prompt = get_prompt(query, functions=functions)
output = pipe(prompt)

print(output)
Contributing

All the models, and data used to train the models is released under Apache 2.0. Gorilla is an open source effort from UC Berkeley and we welcome contributors. Please email us your comments, criticism, and questions. More information about the project can be found at https://gorilla.cs.berkeley.edu/

Pricing of gorilla-openfunctions-v1 replicate.com

Run time and cost

This model costs approximately $0.00058 to run on Replicate, or 1724 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker .

This model runs on Nvidia A40 GPU hardware . Predictions typically complete within 1 seconds.

Runs of tomasmcm gorilla-openfunctions-v1 on replicate.com

416
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About gorilla-openfunctions-v1 replicate.com Model

More gorilla-openfunctions-v1 license Visit here:

https://huggingface.co/TheBloke/gorilla-openfunctions-v1-AWQ

gorilla-openfunctions-v1 replicate.com

gorilla-openfunctions-v1 replicate.com is an AI model on replicate.com that provides gorilla-openfunctions-v1's model effect (Source: gorilla-llm/gorilla-openfunctions-v1 ✦ Quant: TheBloke/gorilla-openfunctions-v1-AWQ ✦ Extend Large Language Model (LLM) Chat Completion feature to formulate executable APIs call given natural language instructions and API context), which can be used instantly with this tomasmcm gorilla-openfunctions-v1 model. replicate.com supports a free trial of the gorilla-openfunctions-v1 model, and also provides paid use of the gorilla-openfunctions-v1. Support call gorilla-openfunctions-v1 model through api, including Node.js, Python, http.

gorilla-openfunctions-v1 replicate.com Url

https://replicate.com/tomasmcm/gorilla-openfunctions-v1

tomasmcm gorilla-openfunctions-v1 online free

gorilla-openfunctions-v1 replicate.com is an online trial and call api platform, which integrates gorilla-openfunctions-v1's modeling effects, including api services, and provides a free online trial of gorilla-openfunctions-v1, you can try gorilla-openfunctions-v1 online for free by clicking the link below.

tomasmcm gorilla-openfunctions-v1 online free url in replicate.com:

https://replicate.com/tomasmcm/gorilla-openfunctions-v1

gorilla-openfunctions-v1 install

gorilla-openfunctions-v1 is an open source model from GitHub that offers a free installation service, and any user can find gorilla-openfunctions-v1 on GitHub to install. At the same time, replicate.com provides the effect of gorilla-openfunctions-v1 install, users can directly use gorilla-openfunctions-v1 installed effect in replicate.com for debugging and trial. It also supports api for free installation.

gorilla-openfunctions-v1 install url in replicate.com:

https://replicate.com/tomasmcm/gorilla-openfunctions-v1

Url of gorilla-openfunctions-v1

gorilla-openfunctions-v1 replicate.com Url

Provider of gorilla-openfunctions-v1 replicate.com

tomasmcm
ORGANIZATIONS

Other API from tomasmcm

replicate

Source: llamas-community/LlamaGuard-7b ✦ Quant: TheBloke/LlamaGuard-7B-AWQ ✦ Llama-Guard is a 7B parameter Llama 2-based input-output safeguard model

Total runs: 541.5K
Run Growth: 0
Growth Rate: 0.00%
Updated:January 05 2024
replicate

Source: HuggingFaceH4/zephyr-7b-beta ✦ Quant: TheBloke/zephyr-7B-beta-AWQ ✦ Zephyr is a series of language models that are trained to act as helpful assistants. Zephyr-7B-β is the second model in the series

Total runs: 188.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 29 2023
replicate

Source: berkeley-nest/Starling-LM-7B-alpha ✦ Quant: TheBloke/Starling-LM-7B-alpha-AWQ ✦ An open large language model (LLM) trained by Reinforcement Learning from AI Feedback (RLAIF)

Total runs: 57.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 30 2023
replicate

Source: kaist-ai/prometheus-13b-v1.0 ✦ Quant: TheBloke/prometheus-13B-v1.0-AWQ ✦ An alternative to GPT-4 when evaluating LLMs & Reward models for RLHF

Total runs: 54.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 18 2023
replicate

Source: mistralai/Mistral-7B-Instruct-v0.2 ✦ Quant: TheBloke/Mistral-7B-Instruct-v0.2-AWQ ✦ Improved instruct fine-tuned version of Mistral-7B-Instruct-v0.1

Total runs: 27.3K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 12 2023
replicate

Source: upstage/SOLAR-10.7B-Instruct-v1.0 ✦ Quant: TheBloke/SOLAR-10.7B-Instruct-v1.0-AWQ ✦ Elevating Performance with Upstage Depth UP Scaling!

Total runs: 4.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 15 2023
replicate

Source: umd-zhou-lab/claude2-alpaca-13B ✦ Quant: TheBloke/claude2-alpaca-13B-AWQ ✦ This model is trained by fine-tuning llama-2 with claude2 alpaca data

Total runs: 3.9K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 10 2023
replicate

Source: Pclanglais/MonadGPT ✦ Quant: TheBloke/MonadGPT-AWQ ✦ What would have happened if ChatGPT was invented in the 17th century?

Total runs: 811
Run Growth: 0
Growth Rate: 0.00%
Updated:December 07 2023
replicate

Source: Intel/neural-chat-7b-v3-1 ✦ Quant: TheBloke/neural-chat-7B-v3-1-AWQ ✦ Fine-tuned model based on mistralai/Mistral-7B-v0.1

Total runs: 773
Run Growth: 0
Growth Rate: 0.00%
Updated:November 18 2023
replicate

Source: teknium/Mistral-Trismegistus-7B ✦ Quant: TheBloke/Mistral-Trismegistus-7B-AWQ ✦ Mistral Trismegistus is a model made for people interested in the esoteric, occult, and spiritual

Total runs: 597
Run Growth: 0
Growth Rate: 0.00%
Updated:October 23 2023
replicate

Source: migtissera/Synthia-13B-v1.2 ✦ Quant: TheBloke/Synthia-13B-v1.2-AWQ ✦ SynthIA (Synthetic Intelligent Agent) is a LLama-2-13B model trained on Orca style datasets

Total runs: 589
Run Growth: 0
Growth Rate: 0.00%
Updated:October 23 2023
replicate

Source: ajibawa-2023/carl-llama-2-13b ✦ Quant: TheBloke/Carl-Llama-2-13B-AWQ ✦ Carl: A Therapist AI

Total runs: 545
Run Growth: 0
Growth Rate: 0.00%
Updated:October 23 2023
replicate

Source: meta-math/MetaMath-Mistral-7B ✦ Quant: TheBloke/MetaMath-Mistral-7B-AWQ ✦ Bootstrap Your Own Mathematical Questions for Large Language Models

Total runs: 391
Run Growth: 0
Growth Rate: 0.00%
Updated:November 14 2023
replicate

Source: bavest/fin-llama-33b ✦ Quant: TheBloke/fin-llama-33B-AWQ ✦ Efficient Finetuning of Quantized LLMs for Finance

Total runs: 305
Run Growth: 0
Growth Rate: 0.00%
Updated:October 23 2023
replicate

Source: monology/openinstruct-mistral-7b ✦ Quant: TheBloke/openinstruct-mistral-7B-AWQ ✦ Commercially-usable 7B model, based on mistralai/Mistral-7B-v0.1 and finetuned on VMware/open-instruct

Total runs: 295
Run Growth: 0
Growth Rate: 0.00%
Updated:November 29 2023
replicate

Source: rwitz/go-bruins-v2 ✦ Quant: TheBloke/go-bruins-v2-AWQ ✦ Designed to push the boundaries of NLP applications, offering unparalleled performance in generating human-like text

Total runs: 218
Run Growth: 0
Growth Rate: 0.00%
Updated:December 10 2023
replicate

Source: Unbabel/TowerInstruct-7B-v0.1 ✦ Quant: TheBloke/TowerInstruct-7B-v0.1-AWQ ✦ This model is trained to handle several translation-related tasks, such as general machine translation, gramatical error correction, and paraphrase generation

Total runs: 188
Run Growth: 0
Growth Rate: 0.00%
Updated:January 17 2024
replicate

Source: Q-bert/MetaMath-Cybertron-Starling ✦ Quant: TheBloke/MetaMath-Cybertron-Starling-AWQ ✦ Merge Q-bert/MetaMath-Cybertron and berkeley-nest/Starling-LM-7B-alpha using slerp merge

Total runs: 182
Run Growth: 0
Growth Rate: 0.00%
Updated:December 11 2023
replicate

Source: gradientai/Llama-3-8B-Instruct-Gradient-4194k ✦ Quant: solidrust/Llama-3-8B-Instruct-Gradient-4194k-AWQ ✦ Extending LLama-3 8B's context length from 8k to 4194K

Total runs: 142
Run Growth: 0
Growth Rate: 0.00%
Updated:May 17 2024
replicate

Source: PocketDoc/Dans-AdventurousWinds-Mk2-7b ✦ Quant: TheBloke/Dans-AdventurousWinds-Mk2-7B-AWQ ✦ This model is proficient in crafting text-based adventure games

Total runs: 129
Run Growth: 0
Growth Rate: 0.00%
Updated:November 18 2023
replicate

Source: WhiteRabbitNeo/WhiteRabbitNeo-13B-v1 ✦ TheBloke/WhiteRabbitNeo-13B-AWQ ✦ WhiteRabbitNeo is a model series that can be used for offensive and defensive cybersecurity

Total runs: 116
Run Growth: 0
Growth Rate: 0.00%
Updated:January 20 2024
replicate

Source: NousResearch/Obsidian-3B-V0.5 ✦ Worlds smallest multi-modal LLM

Total runs: 116
Run Growth: 0
Growth Rate: 0.00%
Updated:November 18 2023
replicate

Source: TinyLlama/TinyLlama-1.1B-Chat-v1.0 ✦ Quant: TheBloke/TinyLlama-1.1B-Chat-v1.0-AWQ ✦ The TinyLlama project is an open endeavor to pretrain a 1.1B Llama model on 3 trillion tokens.

Total runs: 107
Run Growth: 0
Growth Rate: 0.00%
Updated:January 03 2024
replicate

Source: haoranxu/ALMA-7B ✦ Quant: TheBloke/ALMA-7B-AWQ ✦ ALMA (Advanced Language Model-based trAnslator) is an LLM-based translation model

Total runs: 93
Run Growth: 0
Growth Rate: 0.00%
Updated:November 04 2023
replicate

Source: fblgit/una-cybertron-7b-v2-bf16 ✦ Quant: TheBloke/una-cybertron-7B-v2-AWQ ✦ A 7B MistralAI based model, best on it's series. Trained on SFT, DPO and UNA (Unified Neural Alignment) on multiple datasets

Total runs: 85
Run Growth: 0
Growth Rate: 0.00%
Updated:December 07 2023
replicate

Source: SuperAGI/SAM ✦ Quant: TheBloke/SAM-AWQ ✦ SAM (Small Agentic Model), a 7B model that demonstrates impressive reasoning abilities despite its smaller size

Total runs: 77
Run Growth: 0
Growth Rate: 0.00%
Updated:December 23 2023
replicate

Source: Arc53/docsgpt-7b-mistral ✦ Quant: TheBloke/docsgpt-7B-mistral-AWQ ✦ DocsGPT is optimized for Documentation (RAG), fine-tuned for providing answers that are based on context

Total runs: 74
Run Growth: 0
Growth Rate: 0.00%
Updated:December 30 2023
replicate

Source: meta-llama/Llama-2-7b-chat-hf ✦ Quant: TheBloke/Llama-2-7B-Chat-AWQ ✦ Intended for assistant-like chat

Total runs: 74
Run Growth: 0
Growth Rate: 0.00%
Updated:November 14 2023
replicate

Source: v1olet/v1olet_marcoroni-go-bruins-merge-7B ✦ Quant: TheBloke/v1olet_marcoroni-go-bruins-merge-7B-AWQ ✦ Merge AIDC-ai-business/Marcoroni-7B-v3 and rwitz/go-bruins-v2 using slerp merge

Total runs: 71
Run Growth: 0
Growth Rate: 0.00%
Updated:December 13 2023
replicate

Source: Nexusflow/NexusRaven-13B ✦ Quant: TheBloke/NexusRaven-13B-AWQ ✦ Surpassing the state-of-the-art in open-source function calling LLMs

Total runs: 53
Run Growth: 0
Growth Rate: 0.00%
Updated:November 04 2023
replicate

Source: chargoddard/loyal-piano-m7 ✦ Quant: TheBloke/loyal-piano-m7-AWQ ✦ Intended to be a roleplay-focused model with some smarts and good long-context recall

Total runs: 41
Run Growth: 0
Growth Rate: 0.00%
Updated:December 05 2023
replicate

Source: Neuronovo/neuronovo-7B-v0.3 ✦ Quant: TheBloke/neuronovo-7B-v0.3-AWQ ✦ Neuronovo/neuronovo-7B-v0.3 model represents an advanced and fine-tuned version of a large language model, initially based on CultriX/MistralTrix-v1.

Total runs: 41
Run Growth: 0
Growth Rate: 0.00%
Updated:January 12 2024
replicate

Source: fblgit/juanako-7b-UNA ✦ Quant: TheBloke/juanako-7B-UNA-AWQ ✦ juanako uses UNA, Uniform Neural Alignment. A training technique that ease alignment between transformer layers yet to be published

Total runs: 38
Run Growth: 0
Growth Rate: 0.00%
Updated:December 02 2023
replicate

Source: SciPhi/Sensei-7B-V1 ✦ Quant: TheBloke/Sensei-7B-V1-AWQ ✦ Sensei is specialized in performing RAG over detailed web search results

Total runs: 35
Run Growth: 0
Growth Rate: 0.00%
Updated:January 20 2024
replicate

Source: OpenBuddy/openbuddy-zephyr-7b-v14.1 ✦ Quant: TheBloke/openbuddy-zephyr-7B-v14.1-AWQ ✦ Open Multilingual Chatbot

Total runs: 29
Run Growth: 0
Growth Rate: 0.00%
Updated:December 18 2023
replicate

Source: TokenBender/evolvedSeeker_1_3 ✦ Quant: TheBloke/evolvedSeeker_1_3-AWQ ✦ A fine-tuned version of deepseek-ai/deepseek-coder-1.3b-base on 50k instructions for 3 epochs

Total runs: 27
Run Growth: 0
Growth Rate: 0.00%
Updated:November 28 2023
replicate

Source: Severian/ANIMA-Phi-Neptune-Mistral-7B ✦ Quant: TheBloke/ANIMA-Phi-Neptune-Mistral-7B-AWQ ✦ Biomimicry Enhanced LLM

Total runs: 20
Run Growth: 0
Growth Rate: 0.00%
Updated:November 14 2023
replicate

Source: pipizhao/Pandalyst-7B-V1.2 ✦ Quant: TheBloke/Pandalyst-7B-v1.2-AWQ ✦ Pandalyst: A large language model for mastering data analysis using pandas

Total runs: 18
Run Growth: 0
Growth Rate: 0.00%
Updated:January 05 2024
replicate

Source: pipizhao/Pandalyst_13B_V1.0 ✦ Quant: TheBloke/Pandalyst_13B_V1.0-AWQ ✦ Pandalyst: A large language model for mastering data analysis using pandas

Total runs: 18
Run Growth: 0
Growth Rate: 0.00%
Updated:January 31 2024
replicate

Source: allenai/digital-socrates-13b ✦ Quant: TheBloke/digital-socrates-13B-AWQ ✦ Digital Socrates is an open-source, automatic explanation-critiquing model

Total runs: 18
Run Growth: 0
Growth Rate: 0.00%
Updated:January 17 2024