Nexus Raven 是一個針對函數呼叫任務進行指令微調的 13B 模型。

13b

41.7K 13 個月前

自述檔案

Nexus Raven 是一個 130 億參數的模型,專為函數呼叫任務而設計。

已更新至 NexusRaven-V2,此模型是更新的開放原始碼且商業上可行的函數呼叫模型

  • 多功能函數呼叫能力:能夠在許多具挑戰性的情況下產生單一函數呼叫、巢狀呼叫和平行呼叫。
  • 完全可解釋:能夠為其產生的函數呼叫產生非常詳細的解釋。此行為可以關閉,以節省推理期間的 tokens。
  • 效能亮點:在涉及巢狀和複合函數的人工生成用例中,函數呼叫成功率超越 GPT-4 高達 7%。
  • 推廣至未見事物:從未在評估中使用的函數上進行訓練。
  • 商業上允許:訓練不涉及任何由專有 LLM(如 GPT-4)產生的資料。當模型部署在商業應用程式中時,您可以完全控制模型。

範例提示

Function:
def get_weather_data(coordinates):
    """
    Fetches weather data from the Open-Meteo API for the given latitude and longitude.

    Args:
    coordinates (tuple): The latitude of the location.

    Returns:
    float: The current temperature in the coordinates you've asked for
    """

Function:
def get_coordinates_from_city(city_name):
    """
    Fetches the latitude and longitude of a given city name using the Maps.co Geocoding API.

    Args:
    city_name (str): The name of the city.

    Returns:
    tuple: The latitude and longitude of the city.
    """

User Query: {query}<human_end>

這將產生類似於以下的響應

Call: get_weather_data(coordinates=get_coordinates_from_city(city_name='Seattle'))<bot_end>
Thought: The function call `get_weather_data(coordinates=get_coordinates_from_city(city_name='Seattle'))` answers the question "What's the weather like in Seattle right now?" by following these steps:

1. `get_coordinates_from_city(city_name='Seattle')`: This function call fetches the latitude and longitude of the city "Seattle" using the Maps.co Geocoding API.
2. `get_weather_data(coordinates=...)`: This function call fetches the current weather data for the coordinates returned by the previous function call.

Therefore, the function call `get_weather_data(coordinates=get_coordinates_from_city(city_name='Seattle'))` answers the question "What's the weather like in Seattle right now?" by first fetching the coordinates of the city "Seattle" and then fetching the current weather data for those coordinates.

參考文獻

GitHub

Hugging Face