--- license: cc-by-nc-4.0 base_model: microsoft/Phi-3 model-index: - name: Octopus-V4-3B results: [] tags: - AI agent - Graph inference: false space: false spaces: false language: - en --- # Octopus V4: Graph of language models ## Octopus V4
- Nexa AI Website - Octopus-v4 Github - ArXiv
## Introduction Octopus-V4-3B, an advanced open-source language model with 3 billion parameters, serves as the master node in Nexa AI's envisioned graph of language models. Tailored specifically for the MMLU benchmark topics, this model efficiently translates user queries into formats that specialized models can effectively process. It excels at directing these queries to the appropriate specialized model, ensuring precise and effective query handling. 📱 **Compact Size**: Octopus-V4-3B is compact, enabling it to operate on smart devices efficiently and swiftly. 🐙 **Accuracy**: Octopus-V4-3B accurately maps user queries to the specialized model using a functional token design, enhancing its precision. 💪 **Reformat Query**: Octopus-V4-3B assists in converting natural human language into a more professional format, improving query description and resulting in more accurate responses. ## Example Use Cases You can run the model on a GPU using the following code. ```python import torch from transformers import AutoModelForCausalLM, AutoTokenizer import time import warnings warnings.filterwarnings("ignore") torch.random.manual_seed(0) import json model = AutoModelForCausalLM.from_pretrained( "NexaAIDev/Octopus-v4", device_map="cuda:0", torch_dtype=torch.bfloat16, trust_remote_code=True ) tokenizer = AutoTokenizer.from_pretrained("NexaAIDev/octopus-v4-finetuned-v1") question = "Tell me the result of derivative of x^3 when x is 2?" inputs = f"<|system|>You are a router. Below is the query from the users, please call the correct function and generate the parameters to call the function.<|end|><|user|>{question}<|end|><|assistant|>" print(inputs) print('\n============= Below is the response ==============\n') # You should consider to use early stopping with