GraySoft
Projects Models About FAQ Contact Download guIDE →
Model Intelligence Sheet

richarderkhov/salesforce_-_xlam-7b-r-gguf overview

taskinstruction = """ Based on the previous context and API request history, generate an API request or a response as an AI assistant.""".strip() formatinstruction = """ The output should be of the JSON format, which specifies a list of generated function calls. The example format is as follows, please make sure the parameter type is correct. If no function call is needed, please make toolcalls an empty list "[]". """.strip() # Define the input query and available tools query = "What's the weather like in New York in fahrenheit?" getweatherapi = { "name": "getweather", "description": "Get the current weather for a location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, New York" }, "unit": { "type": "string", "enum": ["celsius", "fahrenheit"], "description": "The unit of temperature to return" } }, "required": ["location"] } } searchapi = { "name": "search", "description": "Search for information on the internet", "parameters": { "type": "object", "properties": { "query": { "type": "string", "description": "The search query, e.g. 'latest news on AI'" } }, "required": ["query"] } } openaiformattools = [getweatherapi, searchapi] # Helper function to convert openai format tools to our more concise xLAM format def converttoxlamtool(tools): '''''' if isinstance(tools, dict): return { "name": tools["name"], "description": tools["description"], "parameters": {k: v for k, v in tools["parameters"].get("properties", {}).items()} } elif isinstance(tools, list): return [converttoxlamtool(tool) for tool in tools] else: return tools def buildconversationhistoryprompt(conversationhistory: str): parsedhistory = [] for stepdata in conversationhistory: parsedhistory.append({ "stepid": stepdata["stepid"], "thought": stepdata["thought"], "toolcalls": stepdata["toolcalls"], "nextobservation": stepdata["nextobservation"], "userinput": stepdata['userinput'] }) historystring = json.dumps(parsedhistory) return f"\n[BEGIN OF HISTORY STEPS]\n{historystring}\n[END OF HISTORY STEPS]\n" # Helper function to build the input prompt for our model def buildprompt(taskinstruction: str, formatinstruction: str, tools: list, query: str, conversationhistory: list): prompt = f"[BEGIN OF TASK INSTRUCTION]\n{taskinstruction}\n[END OF TASK INSTRUCTION]\n\n" prompt += f"[BEGIN OF AVAILABLE TOOLS]\n{json.dumps(xlamformattools)}\n[END OF AVAILABLE TOOLS]\n\n" prompt += f"[BEGIN OF FORMAT INSTRUCTION]\n{formatinstruction}\n[END OF FORMAT INSTRUCTION]\n\n" prompt += f"[BEGIN OF QUERY]\n{query}\n[END OF QUERY]\n\n" if len(conversationhistory) 0: prompt += buildconversationhistoryprompt(conversationhistory) return prompt # Build the input and start the inference xlamformattools = converttoxlamtool(openaiformattools) conversationhistory = [] content = buildprompt(taskinstruction, formatinstruction, xlamformattools, query, conversationhistory) messages=[ { 'role': 'user', 'content': content} ] inputs = tokenizer.applychattemplate(messages, addgenerationprompt=True, returntensors="pt").to(model.device) # tokenizer.eostokenid is the id of token outputs = model.generate(inputs, maxnewtokens=512, dosample=False, numreturnsequences=1, eostokenid=tokenizer.eostokenid) agentaction = tokenizer.decode(outputs[0][len(inputs[0]):], skipspecialtokens=True) shell {"thought": "I need to get the current weather for New York in fahrenheit.", "toolcalls": [{"name": "getweather", "arguments": {"location": "New York", "unit": "fahrenheit"}}]} python def parseagentaction(agentaction: str): """ Given an agent's action, parse it to add to conversation history """ try: parsedagentactionjson = json.loads(agentaction) except: return "", [] if "thought" not in parsedagentactionjson.keys(): thought = "" else: thought = parsedagentactionjson["thought"] if "toolcalls" not in parsedagentactionjson.keys(): toolcalls = [] else: toolcalls = parsedagentactionjson["toolcalls"] return thought, toolcalls def updateconversationhistory(conversationhistory: list, agentaction: str, environmentresponse: str, userinput: str): """ Update the conversation history list based on the new agentaction, environmentresponse, and/or userinput """ thought, toolcalls = parseagentaction(agentaction) newstepdata = { "stepid": len(conversationhistory) + 1, "thought": thought, "toolcalls": toolcalls, "stepid": len(conversationhistory), "nextobservation": environmentresponse, "userinput": userinput, } conversationhistory.append(newstepdata) def getenvironmentresponse(agentaction: str): """ Get the environment response for the agentaction """ # TODO: add custom implementation here errormessage, responsemessage = "", "" return {"error": errormessage, "response": responsemessage} # ------------- before here are the steps to get agentresponse from the example above ---------- # 1. get the next state after agent's response: # The next 2 lines are examples of getting environment response and userinput. # It is depended on particular usage, we can have either one or both of those. environmentresponse = getenvironmentresponse(agentaction) userinput = "Now, search on the Internet for cute puppies" # 2. after we got environmentresponse and (or) userinput, we want to add to our conversation history updateconversationhistory(conversationhistory, agentaction, environmentresponse, userinput) # 3. we now can build the prompt content = buildprompt(taskinstruction, formatinstruction, xlamformattools, query, conversationhistory) # 4. Now, we just retrieve the inputs for the LLM messages=[ { 'role': 'user', 'content': content} ] inputs = tokenizer.applychattemplate(messages, addgenerationprompt=True, returntensors="pt").to(model.device) # 5. Generate the outputs & decode # tokenizer.eostokenid is the id of token outputs = model.generate(inputs, maxnewtokens=512, dosample=False, numreturnsequences=1, eostokenid=tokenizer.eostokenid) agentaction = tokenizer.decode(outputs[0][len(inputs[0]):], skipspecialtokens=True) shell {"thought": "I need to get the current weather for New York in fahrenheit.", "toolcalls": [{"name": "getweather", "arguments": {"location": "New York", "unit": "fahrenheit"}}]} json [BEGIN OF TASK INSTRUCTION] Based on the previous context and API request history, generate an API request or a response as an AI assistant. [END OF TASK INSTRUCTION] [BEGIN OF AVAILABLE TOOLS] [ { "name": "getfireinfo", "description": "Query the latest wildfire information", "parameters": { "location": { "type": "string", "description": "Location of the wildfire, for example: 'California'", "required": true, "format": "free" }, "radius": { "type": "number", "description": "The radius (in miles) around the location where the wildfire is occurring, for example: 10", "required": false, "format": "free" } } }, { "name": "gethurricaneinfo", "description": "Query the latest hurricane information", "parameters": { "name": { "type": "string", "description": "Name of the hurricane, for example: 'Irma'", "required": true, "format": "free" } } }, { "name": "getearthquakeinfo", "description": "Query the latest earthquake information", "parameters": { "magnitude": { "type": "number", "description": "The minimum magnitude of the earthquake that needs to be queried.", "required": false, "format": "free" }, "location": { "type": "string", "description": "Location of the earthquake, for example: 'California'", "required": false, "format": "free" } } } ] [END OF AVAILABLE TOOLS] [BEGIN OF FORMAT INSTRUCTION] Your output should be in the JSON format, which specifies a list of function calls. The example format is as follows. Please make sure the parameter type is correct. If no function call is needed, please make toolcalls an empty list '[]'. [END OF FORMAT INSTRUCTION] [BEGIN OF QUERY] User: Can you give me the latest information on the wildfires occurring in California? [END OF QUERY] [BEGIN OF HISTORY STEPS] [ { "thought": "Sure, what is the radius (in miles) around the location of the wildfire?", "toolcalls": [], "stepid": 1, "nextobservation": "", "userinput": "User: Let me think... 50 miles." }, { "thought": "", "toolcalls": [ { "name": "getfireinfo", "arguments": { "location": "California", "radius": 50 } } ], "stepid": 2, "nextobservation": [ { "location": "Los Angeles", "acresburned": 1500, "status": "contained" }, { "location": "San Diego", "acresburned": 12000, "status": "active" } ] }, { "thought": "Based on the latest information, there are wildfires in Los Angeles and San Diego. The wildfire in Los Angeles has burned 1,500 acres and is contained, while the wildfire in San Diego has burned 12,000 acres and is still active.", "toolcalls": [], "stepid": 3, "nextobservation": "", "userinput": "User: Can you tell me about the latest earthquake?" } ] [END OF HISTORY STEPS] json {"thought": "", "toolcalls": [{"name": "getearthquake_info", "arguments": {"location": "California"}}]}

ggufarxiv:2409.03215arxiv:2406.18518arxiv:2402.15506endpoints_compatibleregion:usconversational
richarderkhov/salesforce_-_xlam-7b-r-gguf visual
Downloads
139
Likes
0
Pipeline
Library
Visibility
Public
Access
Open

Repository Files & Downloads

22 files detected
Direct downloads for all repository files
FileTypeQuantizationSizeLink
xLAM-7b-r.IQ3_M.gguf GGUF IQ3_M 3.06 GB Download
xLAM-7b-r.IQ3_S.gguf GGUF IQ3_S 2.96 GB Download
xLAM-7b-r.IQ3_XS.gguf GGUF IQ3_XS 2.81 GB Download
xLAM-7b-r.IQ4_NL.gguf GGUF IQ4_NL 3.87 GB Download
xLAM-7b-r.IQ4_XS.gguf GGUF IQ4_XS 3.67 GB Download
xLAM-7b-r.Q2_K.gguf GGUF Q2_K 2.53 GB Download
xLAM-7b-r.Q3_K.gguf GGUF Q3_K 3.28 GB Download
xLAM-7b-r.Q3_K_L.gguf GGUF Q3_K_L 3.56 GB Download
xLAM-7b-r.Q3_K_M.gguf GGUF Q3_K_M 3.28 GB Download
xLAM-7b-r.Q3_K_S.gguf GGUF Q3_K_S 2.95 GB Download
xLAM-7b-r.Q4_0.gguf GGUF 3.83 GB Download
xLAM-7b-r.Q4_1.gguf GGUF 4.24 GB Download
xLAM-7b-r.Q4_K.gguf GGUF Q4_K 4.07 GB Download
xLAM-7b-r.Q4_K_M.gguf GGUF Q4_K_M 4.07 GB Download
xLAM-7b-r.Q4_K_S.gguf GGUF Q4_K_S 3.86 GB Download
xLAM-7b-r.Q5_0.gguf GGUF 4.65 GB Download
xLAM-7b-r.Q5_1.gguf GGUF 5.07 GB Download
xLAM-7b-r.Q5_K.gguf GGUF Q5_K 4.78 GB Download
xLAM-7b-r.Q5_K_M.gguf GGUF Q5_K_M 4.78 GB Download
xLAM-7b-r.Q5_K_S.gguf GGUF Q5_K_S 4.65 GB Download
xLAM-7b-r.Q6_K.gguf GGUF Q6_K 5.53 GB Download
xLAM-7b-r.Q8_0.gguf GGUF 7.17 GB Download

Model Details Live

Model Slug
richarderkhov/salesforce_-_xlam-7b-r-gguf
Author
RichardErkhov
Pipeline Task
Library
Created
2024-09-20
Last Modified
2024-09-20
Gated
No
Private
No
HF SHA
a6961a555997fa0a372f832803b7ab983dfdef6e
License
Unknown
Language
Unknown
Base Model
Unknown

Metadata Inspector

Normalized metadata (stored in metadata_json)
{
  "metadata": {},
  "card_data": {
    "frontmatter": {},
    "hero_image_url": "https://huggingface.co/datasets/jianguozhang/logos/resolve/main/xlam-no-background.png",
    "summary": "task_instruction = \"\"\" Based on the previous context and API request history, generate an API request or a response as an AI assistant.\"\"\".strip() format_instruction = \"\"\" The output should be of the JSON format, which specifies a list of generated function calls. The example format is as follows, please make sure the parameter type is correct. If no function call is needed, please make tool_calls an empty list \"[]\". `` {\"thought\": \"the thought process, or an empty string\", \"tool_calls\": [{\"name\": \"api_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}]} ` \"\"\".strip() # Define the input query and available tools query = \"What's the weather like in New York in fahrenheit?\" get_weather_api = { \"name\": \"get_weather\", \"description\": \"Get the current weather for a location\", \"parameters\": { \"type\": \"object\", \"properties\": { \"location\": { \"type\": \"string\", \"description\": \"The city and state, e.g. San Francisco, New York\" }, \"unit\": { \"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"], \"description\": \"The unit of temperature to return\" } }, \"required\": [\"location\"] } } search_api = { \"name\": \"search\", \"description\": \"Search for information on the internet\", \"parameters\": { \"type\": \"object\", \"properties\": { \"query\": { \"type\": \"string\", \"description\": \"The search query, e.g. 'latest news on AI'\" } }, \"required\": [\"query\"] } } openai_format_tools = [get_weather_api, search_api] # Helper function to convert openai format tools to our more concise xLAM format def convert_to_xlam_tool(tools): '''''' if isinstance(tools, dict): return { \"name\": tools[\"name\"], \"description\": tools[\"description\"], \"parameters\": {k: v for k, v in tools[\"parameters\"].get(\"properties\", {}).items()} } elif isinstance(tools, list): return [convert_to_xlam_tool(tool) for tool in tools] else: return tools def build_conversation_history_prompt(conversation_history: str): parsed_history = [] for step_data in conversation_history: parsed_history.append({ \"step_id\": step_data[\"step_id\"], \"thought\": step_data[\"thought\"], \"tool_calls\": step_data[\"tool_calls\"], \"next_observation\": step_data[\"next_observation\"], \"user_input\": step_data['user_input'] }) history_string = json.dumps(parsed_history) return f\"\\n[BEGIN OF HISTORY STEPS]\\n{history_string}\\n[END OF HISTORY STEPS]\\n\" # Helper function to build the input prompt for our model def build_prompt(task_instruction: str, format_instruction: str, tools: list, query: str, conversation_history: list): prompt = f\"[BEGIN OF TASK INSTRUCTION]\\n{task_instruction}\\n[END OF TASK INSTRUCTION]\\n\\n\" prompt += f\"[BEGIN OF AVAILABLE TOOLS]\\n{json.dumps(xlam_format_tools)}\\n[END OF AVAILABLE TOOLS]\\n\\n\" prompt += f\"[BEGIN OF FORMAT INSTRUCTION]\\n{format_instruction}\\n[END OF FORMAT INSTRUCTION]\\n\\n\" prompt += f\"[BEGIN OF QUERY]\\n{query}\\n[END OF QUERY]\\n\\n\" if len(conversation_history) > 0: prompt += build_conversation_history_prompt(conversation_history) return prompt # Build the input and start the inference xlam_format_tools = convert_to_xlam_tool(openai_format_tools) conversation_history = [] content = build_prompt(task_instruction, format_instruction, xlam_format_tools, query, conversation_history) messages=[ { 'role': 'user', 'content': content} ] inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors=\"pt\").to(model.device) # tokenizer.eos_token_id is the id of  token outputs = model.generate(inputs, max_new_tokens=512, do_sample=False, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id) agent_action = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True) `` Then you should be able to see the following output string in JSON format: `shell {\"thought\": \"I need to get the current weather for New York in fahrenheit.\", \"tool_calls\": [{\"name\": \"get_weather\", \"arguments\": {\"location\": \"New York\", \"unit\": \"fahrenheit\"}}]} ` #### 2. Multi-turn use case We also support multi-turn interaction with our model series. Here is the example of next round of interaction from the above example: ``python def parse_agent_action(agent_action: str): \"\"\" Given an agent's action, parse it to add to conversation history \"\"\" try: parsed_agent_action_json = json.loads(agent_action) except: return \"\", [] if \"thought\" not in parsed_agent_action_json.keys(): thought = \"\" else: thought = parsed_agent_action_json[\"thought\"] if \"tool_calls\" not in parsed_agent_action_json.keys(): tool_calls = [] else: tool_calls = parsed_agent_action_json[\"tool_calls\"] return thought, tool_calls def update_conversation_history(conversation_history: list, agent_action: str, environment_response: str, user_input: str): \"\"\" Update the conversation history list based on the new agent_action, environment_response, and/or user_input \"\"\" thought, tool_calls = parse_agent_action(agent_action) new_step_data = { \"step_id\": len(conversation_history) + 1, \"thought\": thought, \"tool_calls\": tool_calls, \"step_id\": len(conversation_history), \"next_observation\": environment_response, \"user_input\": user_input, } conversation_history.append(new_step_data) def get_environment_response(agent_action: str): \"\"\" Get the environment response for the agent_action \"\"\" # TODO: add custom implementation here error_message, response_message = \"\", \"\" return {\"error\": error_message, \"response\": response_message} # ------------- before here are the steps to get agent_response from the example above ---------- # 1. get the next state after agent's response: #   The next 2 lines are examples of getting environment response and user_input. #   It is depended on particular usage, we can have either one or both of those. environment_response = get_environment_response(agent_action) user_input = \"Now, search on the Internet for cute puppies\" # 2. after we got environment_response and (or) user_input, we want to add to our conversation history update_conversation_history(conversation_history, agent_action, environment_response, user_input) # 3. we now can build the prompt content = build_prompt(task_instruction, format_instruction, xlam_format_tools, query, conversation_history) # 4. Now, we just retrieve the inputs for the LLM messages=[ { 'role': 'user', 'content': content} ] inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors=\"pt\").to(model.device) # 5. Generate the outputs & decode #   tokenizer.eos_token_id is the id of  token outputs = model.generate(inputs, max_new_tokens=512, do_sample=False, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id) agent_action = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True) `` This would be the corresponding output: `shell {\"thought\": \"I need to get the current weather for New York in fahrenheit.\", \"tool_calls\": [{\"name\": \"get_weather\", \"arguments\": {\"location\": \"New York\", \"unit\": \"fahrenheit\"}}]} ` We highly recommend to use our provided prompt format and helper functions to yield the best function-calling performance of our model. #### Example multi-turn prompt and output Prompt: ``json [BEGIN OF TASK INSTRUCTION] Based on the previous context and API request history, generate an API request or a response as an AI assistant. [END OF TASK INSTRUCTION] [BEGIN OF AVAILABLE TOOLS] [ { \"name\": \"get_fire_info\", \"description\": \"Query the latest wildfire information\", \"parameters\": { \"location\": { \"type\": \"string\", \"description\": \"Location of the wildfire, for example: 'California'\", \"required\": true, \"format\": \"free\" }, \"radius\": { \"type\": \"number\", \"description\": \"The radius (in miles) around the location where the wildfire is occurring, for example: 10\", \"required\": false, \"format\": \"free\" } } }, { \"name\": \"get_hurricane_info\", \"description\": \"Query the latest hurricane information\", \"parameters\": { \"name\": { \"type\": \"string\", \"description\": \"Name of the hurricane, for example: 'Irma'\", \"required\": true, \"format\": \"free\" } } }, { \"name\": \"get_earthquake_info\", \"description\": \"Query the latest earthquake information\", \"parameters\": { \"magnitude\": { \"type\": \"number\", \"description\": \"The minimum magnitude of the earthquake that needs to be queried.\", \"required\": false, \"format\": \"free\" }, \"location\": { \"type\": \"string\", \"description\": \"Location of the earthquake, for example: 'California'\", \"required\": false, \"format\": \"free\" } } } ] [END OF AVAILABLE TOOLS] [BEGIN OF FORMAT INSTRUCTION] Your output should be in the JSON format, which specifies a list of function calls. The example format is as follows. Please make sure the parameter type is correct. If no function call is needed, please make tool_calls an empty list '[]'. `{\"thought\": \"the thought process, or an empty string\", \"tool_calls\": [{\"name\": \"api_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}]}` [END OF FORMAT INSTRUCTION] [BEGIN OF QUERY] User: Can you give me the latest information on the wildfires occurring in California? [END OF QUERY] [BEGIN OF HISTORY STEPS] [ { \"thought\": \"Sure, what is the radius (in miles) around the location of the wildfire?\", \"tool_calls\": [], \"step_id\": 1, \"next_observation\": \"\", \"user_input\": \"User: Let me think... 50 miles.\" }, { \"thought\": \"\", \"tool_calls\": [ { \"name\": \"get_fire_info\", \"arguments\": { \"location\": \"California\", \"radius\": 50 } } ], \"step_id\": 2, \"next_observation\": [ { \"location\": \"Los Angeles\", \"acres_burned\": 1500, \"status\": \"contained\" }, { \"location\": \"San Diego\", \"acres_burned\": 12000, \"status\": \"active\" } ] }, { \"thought\": \"Based on the latest information, there are wildfires in Los Angeles and San Diego. The wildfire in Los Angeles has burned 1,500 acres and is contained, while the wildfire in San Diego has burned 12,000 acres and is still active.\", \"tool_calls\": [], \"step_id\": 3, \"next_observation\": \"\", \"user_input\": \"User: Can you tell me about the latest earthquake?\" } ] [END OF HISTORY STEPS] `` Output: ``json {\"thought\": \"\", \"tool_calls\": [{\"name\": \"get_earthquake_info\", \"arguments\": {\"location\": \"California\"}}]} ```",
    "quick_links": [],
    "benchmark_table_html": "",
    "readme_markdown": "Quantization made by Richard Erkhov.\n\n[Github](https://github.com/RichardErkhov)\n\n[Discord](https://discord.gg/pvy7H8DZMG)\n\n[Request more models](https://github.com/RichardErkhov/quant_request)\n\n\nxLAM-7b-r - GGUF\n- Model creator: https://huggingface.co/Salesforce/\n- Original model: https://huggingface.co/Salesforce/xLAM-7b-r/\n\n\n| Name | Quant method | Size |\n| ---- | ---- | ---- |\n| [xLAM-7b-r.Q2_K.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q2_K.gguf) | Q2_K | 2.53GB |\n| [xLAM-7b-r.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.IQ3_XS.gguf) | IQ3_XS | 2.81GB |\n| [xLAM-7b-r.IQ3_S.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.IQ3_S.gguf) | IQ3_S | 2.96GB |\n| [xLAM-7b-r.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q3_K_S.gguf) | Q3_K_S | 2.95GB |\n| [xLAM-7b-r.IQ3_M.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.IQ3_M.gguf) | IQ3_M | 3.06GB |\n| [xLAM-7b-r.Q3_K.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q3_K.gguf) | Q3_K | 3.28GB |\n| [xLAM-7b-r.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q3_K_M.gguf) | Q3_K_M | 3.28GB |\n| [xLAM-7b-r.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q3_K_L.gguf) | Q3_K_L | 3.56GB |\n| [xLAM-7b-r.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.IQ4_XS.gguf) | IQ4_XS | 3.67GB |\n| [xLAM-7b-r.Q4_0.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q4_0.gguf) | Q4_0 | 3.83GB |\n| [xLAM-7b-r.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.IQ4_NL.gguf) | IQ4_NL | 3.87GB |\n| [xLAM-7b-r.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q4_K_S.gguf) | Q4_K_S | 3.86GB |\n| [xLAM-7b-r.Q4_K.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q4_K.gguf) | Q4_K | 4.07GB |\n| [xLAM-7b-r.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q4_K_M.gguf) | Q4_K_M | 4.07GB |\n| [xLAM-7b-r.Q4_1.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q4_1.gguf) | Q4_1 | 4.24GB |\n| [xLAM-7b-r.Q5_0.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q5_0.gguf) | Q5_0 | 4.65GB |\n| [xLAM-7b-r.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q5_K_S.gguf) | Q5_K_S | 4.65GB |\n| [xLAM-7b-r.Q5_K.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q5_K.gguf) | Q5_K | 4.78GB |\n| [xLAM-7b-r.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q5_K_M.gguf) | Q5_K_M | 4.78GB |\n| [xLAM-7b-r.Q5_1.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q5_1.gguf) | Q5_1 | 5.07GB |\n| [xLAM-7b-r.Q6_K.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q6_K.gguf) | Q6_K | 5.53GB |\n| [xLAM-7b-r.Q8_0.gguf](https://huggingface.co/RichardErkhov/Salesforce_-_xLAM-7b-r-gguf/blob/main/xLAM-7b-r.Q8_0.gguf) | Q8_0 | 7.17GB |\n\n\n\n\nOriginal model description:\n---\nextra_gated_heading: >-\n  Acknowledge to follow corresponding license to access the\n  repository\nextra_gated_button_content: Agree and access repository\nextra_gated_fields:\n  First Name: text\n  Last Name: text\n  Country: country\n  Affiliation: text\nlicense: cc-by-nc-4.0\ndatasets:\n- Salesforce/xlam-function-calling-60k\nlanguage:\n- en\npipeline_tag: text-generation\ntags:\n- function-calling\n- LLM Agent\n- tool-use\n- mistral\n- pytorch\n---\n\n<p align=\"center\">\n<img width=\"500px\" alt=\"xLAM\" src=\"https://huggingface.co/datasets/jianguozhang/logos/resolve/main/xlam-no-background.png\">\n</p>\n<p align=\"center\">\n  <a href=\"https://www.salesforceairesearch.com/projects/xlam-large-action-models\">[Homepage]</a>  |  \n  <a href=\"https://arxiv.org/abs/2409.03215\">[Paper]</a> | \n  <a href=\"https://github.com/SalesforceAIResearch/xLAM\">[Github]</a> |\n  <a href=\"https://blog.salesforceairesearch.com/large-action-model-ai-agent/\">[Blog]</a> | \n  <a href=\"https://huggingface.co/spaces/Tonic/Salesforce-Xlam-7b-r\">[Community Demo]</a>\n</p>\n<hr>\n\n\nWelcome to the xLAM model family! [Large Action Models (LAMs)](https://blog.salesforceairesearch.com/large-action-models/) are advanced large language models designed to enhance decision-making and translate user intentions into executable actions that interact with the world. LAMs autonomously plan and execute tasks to achieve specific goals, serving as the brains of AI agents. They have the potential to automate workflow processes across various domains, making them invaluable for a wide range of applications.\n**The model release is exclusively for research purposes. A new and enhanced version of xLAM will soon be available exclusively to customers on our Platform.**\n\n## Table of Contents\n- [Model Series](#model-series)\n- [Repository Overview](#repository-overview)\n- [Benchmark Results](#benchmark-results)\n- [Usage](#usage)\n  - [Basic Usage with Huggingface](#basic-usage-with-huggingface)\n- [License](#license)\n- [Citation](#citation)\n\n## Model Series\n\nWe provide a series of xLAMs in different sizes to cater to various applications, including those optimized for function-calling and general agent applications:\n\n| Model                  | # Total Params | Context Length | Download Model  | Download GGUF files |\n|------------------------|----------------|----------------|----------------|----------|\n| xLAM-1b-fc-r           | 1.35B          | 16k            | [🤗 Link](https://huggingface.co/Salesforce/xLAM-1b-fc-r) | [🤗 Link](https://huggingface.co/Salesforce/xLAM-1b-fc-r-gguf) |\n| xLAM-7b-fc-r           | 6.91B          | 4k             | [🤗 Link](https://huggingface.co/Salesforce/xLAM-7b-fc-r) | [🤗 Link](https://huggingface.co/Salesforce/xLAM-7b-fc-r-gguf) |\n| xLAM-7b-r           | 7.24B          | 32k            | [🤗 Link](https://huggingface.co/Salesforce/xLAM-7b-r) | -- |\n| xLAM-8x7b-r           | 46.7B          | 32k             | [🤗 Link](https://huggingface.co/Salesforce/xLAM-8x7b-r) | -- |\n| xLAM-8x22b-r           | 141B          | 64k             | [🤗 Link](https://huggingface.co/Salesforce/xLAM-8x22b-r) | -- |\n\n\n\n\n\n\nFor our Function-calling series (more details are included at [here](https://huggingface.co/Salesforce/xLAM-7b-fc-r)), we also provide their quantized [GGUF](https://huggingface.co/docs/hub/en/gguf) files for efficient deployment and execution. GGUF is a file format designed to efficiently store and load large language models, making GGUF ideal for running AI models on local devices with limited resources, enabling offline functionality and enhanced privacy.\n\nFor more details, check our [GitHub](https://github.com/SalesforceAIResearch/xLAM) and [paper]().\n\n\n## Repository Overview\n\nThis repository is about the general tool use series. For more specialized function calling models, please take a look into our `fc` series [here](https://huggingface.co/Salesforce/xLAM-7b-fc-r).\n\nThe instructions will guide you through the setup, usage, and integration of our model series with HuggingFace.\n### Framework Versions\n\n- Transformers 4.41.0\n- Pytorch 2.3.0+cu121\n- Datasets 2.19.1\n- Tokenizers 0.19.1\n\n## Usage\n\n### Basic Usage with Huggingface\n\nTo use the model from Huggingface, please first install the `transformers` library:\n```bash\npip install transformers>=4.41.0\n```\n\nPlease note that, our model works best with our provided prompt format. \nIt allows us to extract JSON output that is similar to the [function-calling mode of ChatGPT](https://platform.openai.com/docs/guides/function-calling).\n\nWe use the following example to illustrate how to use our model for 1) single-turn use case, and 2) multi-turn use case\n\n#### 1. Single-turn use case\n\n````python\nimport json\nimport torch \nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\ntorch.random.manual_seed(0) \n\nmodel_name = \"Salesforce/xLAM-7b-r\"\nmodel = AutoModelForCausalLM.from_pretrained(model_name, device_map=\"auto\", torch_dtype=\"auto\", trust_remote_code=True)\ntokenizer = AutoTokenizer.from_pretrained(model_name) \n\n# Please use our provided instruction prompt for best performance\ntask_instruction = \"\"\"\nBased on the previous context and API request history, generate an API request or a response as an AI assistant.\"\"\".strip()\n\nformat_instruction = \"\"\"\nThe output should be of the JSON format, which specifies a list of generated function calls. The example format is as follows, please make sure the parameter type is correct. If no function call is needed, please make \ntool_calls an empty list \"[]\".\n```\n{\"thought\": \"the thought process, or an empty string\", \"tool_calls\": [{\"name\": \"api_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}]}\n```\n\"\"\".strip()\n\n# Define the input query and available tools\nquery = \"What's the weather like in New York in fahrenheit?\"\n\nget_weather_api = {\n    \"name\": \"get_weather\",\n    \"description\": \"Get the current weather for a location\",\n    \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"location\": {\n                \"type\": \"string\",\n                \"description\": \"The city and state, e.g. San Francisco, New York\"\n            },\n            \"unit\": {\n                \"type\": \"string\",\n                \"enum\": [\"celsius\", \"fahrenheit\"],\n                \"description\": \"The unit of temperature to return\"\n            }\n        },\n        \"required\": [\"location\"]\n    }\n}\n\nsearch_api = {\n    \"name\": \"search\",\n    \"description\": \"Search for information on the internet\",\n    \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"query\": {\n                \"type\": \"string\",\n                \"description\": \"The search query, e.g. 'latest news on AI'\"\n            }\n        },\n        \"required\": [\"query\"]\n    }\n}\n\nopenai_format_tools = [get_weather_api, search_api]\n\n# Helper function to convert openai format tools to our more concise xLAM format\ndef convert_to_xlam_tool(tools):\n    ''''''\n    if isinstance(tools, dict):\n        return {\n            \"name\": tools[\"name\"],\n            \"description\": tools[\"description\"],\n            \"parameters\": {k: v for k, v in tools[\"parameters\"].get(\"properties\", {}).items()}\n        }\n    elif isinstance(tools, list):\n        return [convert_to_xlam_tool(tool) for tool in tools]\n    else:\n        return tools\n\ndef build_conversation_history_prompt(conversation_history: str):\n    parsed_history = []\n    for step_data in conversation_history:\n        parsed_history.append({\n            \"step_id\": step_data[\"step_id\"],\n            \"thought\": step_data[\"thought\"],\n            \"tool_calls\": step_data[\"tool_calls\"],\n            \"next_observation\": step_data[\"next_observation\"],\n            \"user_input\": step_data['user_input']\n        })\n        \n    history_string = json.dumps(parsed_history)\n    return f\"\\n[BEGIN OF HISTORY STEPS]\\n{history_string}\\n[END OF HISTORY STEPS]\\n\"\n    \n    \n# Helper function to build the input prompt for our model\ndef build_prompt(task_instruction: str, format_instruction: str, tools: list, query: str, conversation_history: list):\n    prompt = f\"[BEGIN OF TASK INSTRUCTION]\\n{task_instruction}\\n[END OF TASK INSTRUCTION]\\n\\n\"\n    prompt += f\"[BEGIN OF AVAILABLE TOOLS]\\n{json.dumps(xlam_format_tools)}\\n[END OF AVAILABLE TOOLS]\\n\\n\"\n    prompt += f\"[BEGIN OF FORMAT INSTRUCTION]\\n{format_instruction}\\n[END OF FORMAT INSTRUCTION]\\n\\n\"\n    prompt += f\"[BEGIN OF QUERY]\\n{query}\\n[END OF QUERY]\\n\\n\"\n    \n    if len(conversation_history) > 0: prompt += build_conversation_history_prompt(conversation_history)\n    return prompt\n    \n# Build the input and start the inference\nxlam_format_tools = convert_to_xlam_tool(openai_format_tools)\n\nconversation_history = []\ncontent = build_prompt(task_instruction, format_instruction, xlam_format_tools, query, conversation_history)\n\nmessages=[\n    { 'role': 'user', 'content': content}\n]\n\ninputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors=\"pt\").to(model.device)\n\n# tokenizer.eos_token_id is the id of <|EOT|> token\noutputs = model.generate(inputs, max_new_tokens=512, do_sample=False, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id)\nagent_action = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True)\n````\n\nThen you should be able to see the following output string in JSON format:\n\n```shell\n{\"thought\": \"I need to get the current weather for New York in fahrenheit.\", \"tool_calls\": [{\"name\": \"get_weather\", \"arguments\": {\"location\": \"New York\", \"unit\": \"fahrenheit\"}}]}\n```\n\n#### 2. Multi-turn use case\n\nWe also support multi-turn interaction with our model series. Here is the example of next round of interaction from the above example:\n\n````python\ndef parse_agent_action(agent_action: str):\n    \"\"\"\n    Given an agent's action, parse it to add to conversation history\n    \"\"\"\n    try: parsed_agent_action_json = json.loads(agent_action)\n    except: return \"\", []\n    \n    if \"thought\" not in parsed_agent_action_json.keys(): thought = \"\"\n    else: thought = parsed_agent_action_json[\"thought\"]\n    \n    if \"tool_calls\" not in parsed_agent_action_json.keys(): tool_calls = []\n    else: tool_calls = parsed_agent_action_json[\"tool_calls\"]\n    \n    return thought, tool_calls\n\ndef update_conversation_history(conversation_history: list, agent_action: str, environment_response: str, user_input: str):\n    \"\"\"\n    Update the conversation history list based on the new agent_action, environment_response, and/or user_input\n    \"\"\"\n    thought, tool_calls = parse_agent_action(agent_action)\n    new_step_data = {\n        \"step_id\": len(conversation_history) + 1,\n        \"thought\": thought,\n        \"tool_calls\": tool_calls,\n        \"step_id\": len(conversation_history),\n        \"next_observation\": environment_response,\n        \"user_input\": user_input,\n    }\n    \n    conversation_history.append(new_step_data)\n\ndef get_environment_response(agent_action: str):\n    \"\"\"\n    Get the environment response for the agent_action\n    \"\"\"\n    # TODO: add custom implementation here\n    error_message, response_message = \"\", \"\"\n    return {\"error\": error_message, \"response\": response_message}\n\n# ------------- before here are the steps to get agent_response from the example above ----------\n\n# 1. get the next state after agent's response:\n#   The next 2 lines are examples of getting environment response and user_input.\n#   It is depended on particular usage, we can have either one or both of those.\nenvironment_response = get_environment_response(agent_action)\nuser_input = \"Now, search on the Internet for cute puppies\"\n\n# 2. after we got environment_response and (or) user_input, we want to add to our conversation history\nupdate_conversation_history(conversation_history, agent_action, environment_response, user_input)\n\n# 3. we now can build the prompt\ncontent = build_prompt(task_instruction, format_instruction, xlam_format_tools, query, conversation_history)\n\n# 4. Now, we just retrieve the inputs for the LLM\nmessages=[\n    { 'role': 'user', 'content': content}\n]\ninputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors=\"pt\").to(model.device)\n\n# 5. Generate the outputs & decode\n#   tokenizer.eos_token_id is the id of <|EOT|> token\noutputs = model.generate(inputs, max_new_tokens=512, do_sample=False, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id)\nagent_action = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True)\n````\n\nThis would be the corresponding output:\n```shell\n{\"thought\": \"I need to get the current weather for New York in fahrenheit.\", \"tool_calls\": [{\"name\": \"get_weather\", \"arguments\": {\"location\": \"New York\", \"unit\": \"fahrenheit\"}}]}\n```\n\nWe highly recommend to use our provided prompt format and helper functions to yield the best function-calling performance of our model.\n\n#### Example multi-turn prompt and output\n\nPrompt:\n````json\n[BEGIN OF TASK INSTRUCTION]\nBased on the previous context and API request history, generate an API request or a response as an AI assistant. \n[END OF TASK INSTRUCTION]\n\n[BEGIN OF AVAILABLE TOOLS]\n[\n    {\n        \"name\": \"get_fire_info\",\n        \"description\": \"Query the latest wildfire information\",\n        \"parameters\": {\n            \"location\": {\n                \"type\": \"string\",\n                \"description\": \"Location of the wildfire, for example: 'California'\",\n                \"required\": true,\n                \"format\": \"free\"\n            },\n            \"radius\": {\n                \"type\": \"number\",\n                \"description\": \"The radius (in miles) around the location where the wildfire is occurring, for example: 10\",\n                \"required\": false,\n                \"format\": \"free\"\n            }\n        }\n    },\n    {\n        \"name\": \"get_hurricane_info\",\n        \"description\": \"Query the latest hurricane information\",\n        \"parameters\": {\n            \"name\": {\n                \"type\": \"string\",\n                \"description\": \"Name of the hurricane, for example: 'Irma'\",\n                \"required\": true,\n                \"format\": \"free\"\n            }\n        }\n    },\n    {\n        \"name\": \"get_earthquake_info\",\n        \"description\": \"Query the latest earthquake information\",\n        \"parameters\": {\n            \"magnitude\": {\n                \"type\": \"number\",\n                \"description\": \"The minimum magnitude of the earthquake that needs to be queried.\",\n                \"required\": false,\n                \"format\": \"free\"\n            },\n            \"location\": {\n                \"type\": \"string\",\n                \"description\": \"Location of the earthquake, for example: 'California'\",\n                \"required\": false,\n                \"format\": \"free\"\n            }\n        }\n    }\n]\n[END OF AVAILABLE TOOLS]\n\n[BEGIN OF FORMAT INSTRUCTION]\nYour output should be in the JSON format, which specifies a list of function calls. The example format is as follows. Please make sure the parameter type is correct. If no function call is needed, please make tool_calls an empty list '[]'.\n```{\"thought\": \"the thought process, or an empty string\", \"tool_calls\": [{\"name\": \"api_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}}]}```\n[END OF FORMAT INSTRUCTION]\n\n[BEGIN OF QUERY]\nUser: Can you give me the latest information on the wildfires occurring in California?\n[END OF QUERY]\n\n[BEGIN OF HISTORY STEPS]\n[\n    {\n        \"thought\": \"Sure, what is the radius (in miles) around the location of the wildfire?\",\n        \"tool_calls\": [],\n        \"step_id\": 1,\n        \"next_observation\": \"\",\n        \"user_input\": \"User: Let me think... 50 miles.\"\n    },\n    {\n        \"thought\": \"\",\n        \"tool_calls\": [\n            {\n                \"name\": \"get_fire_info\",\n                \"arguments\": {\n                    \"location\": \"California\",\n                    \"radius\": 50\n                }\n            }\n        ],\n        \"step_id\": 2,\n        \"next_observation\": [\n            {\n                \"location\": \"Los Angeles\",\n                \"acres_burned\": 1500,\n                \"status\": \"contained\"\n            },\n            {\n                \"location\": \"San Diego\",\n                \"acres_burned\": 12000,\n                \"status\": \"active\"\n            }\n        ]\n    },\n    {\n        \"thought\": \"Based on the latest information, there are wildfires in Los Angeles and San Diego. The wildfire in Los Angeles has burned 1,500 acres and is contained, while the wildfire in San Diego has burned 12,000 acres and is still active.\",\n        \"tool_calls\": [],\n        \"step_id\": 3,\n        \"next_observation\": \"\",\n        \"user_input\": \"User: Can you tell me about the latest earthquake?\"\n    }\n]\n\n[END OF HISTORY STEPS]\n````\n\nOutput:\n````json\n{\"thought\": \"\", \"tool_calls\": [{\"name\": \"get_earthquake_info\", \"arguments\": {\"location\": \"California\"}}]}\n````\n\n## Benchmark Results\nNote: **Bold** and <u>Underline</u> results denote the best result and the second best result for Success Rate, respectively.\n\n### Berkeley Function-Calling Leaderboard (BFCL)\n![xlam-bfcl](media/xlam-bfcl.png)\n*Table 1: Performance comparison on BFCL-v2 leaderboard (cutoff date 09/03/2024). The rank is based on the overall accuracy, which is a weighted average of different evaluation categories. \"FC\" stands for function-calling mode in contrast to using a customized \"prompt\" to extract the function calls.*\n\n### Webshop and ToolQuery\n![xlam-webshop_toolquery](media/xlam-webshop_toolquery.png)\n*Table 2: Testing results on Webshop and ToolQuery. Bold and Underline results denote the best result and the second best result for Success Rate, respectively.*\n\n### Unified ToolQuery\n![xlam-unified_toolquery](media/xlam-unified_toolquery.png)\n*Table 3: Testing results on ToolQuery-Unified. Bold and Underline results denote the best result and the second best result for Success Rate, respectively. Values in brackets indicate corresponding performance on ToolQuery*\n\n### ToolBench\n![xlam-toolbench](media/xlam-toolbench.png)\n*Table 4: Pass Rate on ToolBench on three distinct scenarios. Bold and Underline results denote the best result and the second best result for each setting, respectively. The results for xLAM-8x22b-r are unavailable due to the ToolBench server being down between 07/28/2024 and our evaluation cutoff date 09/03/2024.*\n\n## License\nThe model is distributed under the CC-BY-NC-4.0 license.\n\n## Citation\n\nIf you find this repo helpful, please consider to cite our papers:\n\n```bibtex\n@article{zhang2024xlam,\n  title={xLAM: A Family of Large Action Models to Empower AI Agent Systems},\n  author={Zhang, Jianguo and Lan, Tian and Zhu, Ming and Liu, Zuxin and Hoang, Thai and Kokane, Shirley and Yao, Weiran and Tan, Juntao and Prabhakar, Akshara and Chen, Haolin and others},\n  journal={arXiv preprint arXiv:2409.03215},\n  year={2024}\n}\n```\n\n```bibtex\n@article{liu2024apigen,\n  title={Apigen: Automated pipeline for generating verifiable and diverse function-calling datasets},\n  author={Liu, Zuxin and Hoang, Thai and Zhang, Jianguo and Zhu, Ming and Lan, Tian and Kokane, Shirley and Tan, Juntao and Yao, Weiran and Liu, Zhiwei and Feng, Yihao and others},\n  journal={arXiv preprint arXiv:2406.18518},\n  year={2024}\n}\n```\n\n```bibtex\n@article{zhang2024agentohana,\n  title={AgentOhana: Design Unified Data and Training Pipeline for Effective Agent Learning},\n  author={Zhang, Jianguo and Lan, Tian and Murthy, Rithesh and Liu, Zhiwei and Yao, Weiran and Tan, Juntao and Hoang, Thai and Yang, Liangwei and Feng, Yihao and Liu, Zuxin and others},\n  journal={arXiv preprint arXiv:2402.15506},\n  year={2024}\n}\n```\n\n",
    "related_quantizations": []
  },
  "tags": [
    "gguf",
    "arxiv:2409.03215",
    "arxiv:2406.18518",
    "arxiv:2402.15506",
    "endpoints_compatible",
    "region:us",
    "conversational"
  ],
  "likes": 0,
  "downloads": 139,
  "gated": false,
  "private": false,
  "last_modified": "2024-09-20T03:54:28.000Z",
  "created_at": "2024-09-20T00:36:29.000Z",
  "pipeline_tag": "",
  "library_name": ""
}
Source payload excerpt (from Hugging Face API)
{
  "_id": "66ecc38de2976258bf8305e7",
  "id": "RichardErkhov/Salesforce_-_xLAM-7b-r-gguf",
  "modelId": "RichardErkhov/Salesforce_-_xLAM-7b-r-gguf",
  "sha": "a6961a555997fa0a372f832803b7ab983dfdef6e",
  "createdAt": "2024-09-20T00:36:29.000Z",
  "lastModified": "2024-09-20T03:54:28.000Z",
  "author": "RichardErkhov",
  "downloads": 139,
  "likes": 0,
  "gated": false,
  "private": false,
  "pipeline_tag": "",
  "library_name": "",
  "siblings_count": 24
}