Giter VIP home page Giter VIP logo

octopus-v4's Issues

Support Android API list

Hi, fantastic job! When can you publish the Android API implementations for your demos, and training data ? thanks.

`specialized_infer.py` returns `401 Client Error`

Hello! Kudos to you for making this repository. Also I want to say the paper was awesome too. Combining multiple domain expert models seems to be a promising approach, especially in low-resource settings where we can't run a huge general-purpose model!

I'm having some issue running end-to-end inference with specialized_infer.py (by "end-to-end inference" I mean calling the Octopus model, and then calling an expert model to get the final answer).

First I commented out some experts that do not exist yet:

from utils import functional_token_mapping, extract_content
from specialized_models_inference import (
    inference_biology,
    inference_business,
    inference_chemistry,
    inference_computer_science,
    inference_math,
    inference_physics,
    inference_electrical_engineering,
    inference_history,
    inference_philosophy,
    inference_law,
    #inference_politics,
    inference_culture,
    inference_economics,
    inference_geography,
    #inference_psychology,
    #inference_health,
    #inference_general,
)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
import time

torch.random.manual_seed(0)

model_import_mapping = {
    "physics_gpt": lambda: inference_physics.model(),
    "chemistry_gpt": lambda: inference_chemistry.model(),
    "biology_gpt": lambda: inference_biology.model(),
    "computer_science_gpt": lambda: inference_computer_science.model(),
    "math_gpt": lambda: inference_math.model(),
    "business_gpt": lambda: inference_business.model(),
    "electrical_engineering_gpt": lambda: inference_electrical_engineering.model(),
    "history_gpt": lambda: inference_history.model(),
    "philosophy_gpt": lambda: inference_philosophy.model(),
    "law_gpt": lambda: inference_law.model(),
    #"politics_gpt": lambda: inference_politics.model(),
    "culture_gpt": lambda: inference_culture.model(),
    "economics_gpt": lambda: inference_economics.model(),
    "geography_gpt": lambda: inference_geography.model(),
    #"psychology_gpt": lambda: inference_psychology.model(),
    #"health_gpt": lambda: inference_health.model(),
    #"general_gpt": lambda: inference_general.model(),
}

But then I got this error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_errors.py", line 304, in hf_raise_for_status
    response.raise_for_status()
  File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/NexaAIDev/octopus-v4-finetuned-v1/resolve/main/tokenizer_config.json

...

Traceback (most recent call last):
  File "/content/octopus-v4/specialized_infer.py", line 108, in <module>
    tokenizer = AutoTokenizer.from_pretrained("NexaAIDev/octopus-v4-finetuned-v1")
  File "/usr/local/lib/python3.10/dist-packages/transformers/models/auto/tokenization_auto.py", line 817, in from_pretrained
    tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/transformers/models/auto/tokenization_auto.py", line 649, in get_tokenizer_config
    resolved_config_file = cached_file(
  File "/usr/local/lib/python3.10/dist-packages/transformers/utils/hub.py", line 422, in cached_file
    raise EnvironmentError(
OSError: NexaAIDev/octopus-v4-finetuned-v1 is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with `huggingface-cli login` or by passing `token=<your_token>`

The error suggests that the code is trying to access a ๐Ÿค— model that's not released yet. Any plans on making the model public?

Thanks for looking into this!

Releasing inference code for the politics, psychology, psychology, general

Congratulations on your interesting project and proposal for graph of LMs! Can't wait to try out Octopus v4 with all specialized models. Do you guys plan to release the inference code for politics, psychology, psychology, general models?

I saw this issue: #9 (comment) and commented out these four models for now but really would appreciate if you can fill in the missing picture!

Also, it would be very helpful if you can provide the code for running MMLU using Octopus v4 with expert models. In MMLU_functions.txt, there are only function headers and comments right now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.