Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-2024-05-13· OpenAIAi2 WildChat-4.8M (AI2)

This is a conversation bertween A and B from a huggingface forum: [A] Trying…

  1. User

    This is a conversation bertween A and B from a huggingface forum:

    [A] Trying single_inference.py and this error showed up raise EnvironmentError( OSError: Can't load the configuration of '01-ai/Yi-VL-6B/vit/clip-vit-H-14-laion2B-s32B-b79K-yi-vl-6B-448'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure '01-ai/Yi-VL-6B/vit/clip-vit-H-14-laion2B-s32B-b79K-yi-vl-6B-448' is the correct path to a directory containing a config.json file [B] Please check if you have the local path to the vit folder set up correctly, there should be configuration files in there.

    How should I do what B says?

  2. Assistant

    To follow B's suggestion, you'll need to check the local directory path to ensure it contains the necessary configuration files. Here are the steps you can take:

    Step-by-Step Guide

    1. Locate the Directory:

      • First, find the local directory you believe should contain the model files. This directory should be named vit and be nested within the path 01-ai/Yi-VL-6B.
    2. Verify the Path:

      • Ensure that the path 01-ai/Yi-VL-6B/vit/clip-vit-H-14-laion2B-s32B-b79K-yi-vl-6B-448 is correct and exists on your filesystem.
    3. Check for Configuration Files:

      • Navigate to the directory using a command line or a file explorer.
      • Look for configuration files, specifically a config.json file. This is crucial as it is needed to load the model.
      cd 01-ai/Yi-VL-6B/vit/clip-vit-H-14-laion2B-s32B-b79K-yi-vl-6B-448
      
    4. Confirm the Files:

      • Ensure that the directory contains the config.json file along with other necessary model files (e.g., pytorch_model.bin, tokenizer_config.json, etc.).
    5. Correct the Path if Needed:

      • If the files are not in the expected directory, check if they might be in a different directory or if there's a typo in the path you've provided.
      • Correct any path issues if necessary. For instance, if the model files are actually in 01-ai/Yi-VL-6B/vit/clip-vit-H-14-laion2B-s32B-b79K-yi-vl-6B-448/vit, then you may need to update your script or change the directory structure accordingly.
    6. Loading from the Correct Directory:

      • Update your script (single_inference.py) if needed to point to the correct model directory:
      model_path = 'path/to/your/model/directory'
      

    By ensuring that you have the correct local path set up and that it contains the necessary configuration files, you should be able to resolve the EnvironmentError you encountered.