Skip to content

Unable to load all-MiniLM-L6-v2-f16.gguf OR all-MiniLM-L6-v2-f16.bin #566

@SidAtBluB0X

Description

@SidAtBluB0X

I am trying to load an embedding model - all-MiniLM-L6-v2-f16.gguf.

I am interested in generating embeddings.

Here is the code I have tried, I always get an error when the model is loading.

  // Load model
  string modelPath = "./models/all-MiniLM-L6-v2-f16.gguf";

  var modelParams = new ModelParams(modelPath);            
  using var weights = LLamaWeights.LoadFromFile(modelParams);

  var embedder = new LLamaEmbedder(weights, modelParams);

Error says :
[2024-03-04T03:04:30.115Z] llama_model_load: error loading model: unknown model architecture: 'bert'
[2024-03-04T03:04:30.116Z] llama_load_model_from_file: failed to load model
[2024-03-04T03:04:30.117Z] Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I also tried loading the model file as a bin as I also have a bin.

string modelPath = "./models/all-MiniLM-L6-v2-f16.bin";

Then I get,
[2024-03-04T03:04:30.117Z] Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Any help would be appreciated.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions