Nexus Raven 是一个针对函数调用任务进行指令调优的 13B 模型。

13b

40.8K 12 个月前

Readme

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