GithubHelp home page GithubHelp logo

Comments (4)

martindevans avatar martindevans commented on September 26, 2024

Can you post the full stack trace of the error? Thanks.

from llamasharp.

LSXAxeller avatar LSXAxeller commented on September 26, 2024
System.ArgumentException
  HResult=0x80070057
  Message=EmbeddingMode must be true (Parameter 'params')
  Source=LLamaSharp
  StackTrace:
   at LLama.LLamaEmbedder..ctor(LLamaWeights weights, IContextParams params, ILogger logger)
   at EGOIST.ViewModels.Pages.TextViewModel.<GenerationSwitchModels>b__52_0() in E:\Native\Projects\EGOIST\EGOIST\ViewModels\Pages\TextViewModel.cs:line 266
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

I figured it out. It seems that when I use GenerationModelEmbedder = new(GenerationModel, GenerationModelParameters);, it requires EmbeddingMode = true in GenerationModelParameters. This wasn't necessary in previous versions. Sorry, I'm not very familiar with Visual Studio and detailed stack traces yet.

side question, how to use OpenCL backend ? I have a AMD RX580 GPU but even after installing OpenCL backend it still running on CPU

from llamasharp.

martindevans avatar martindevans commented on September 26, 2024

One of the changes in 0.10.0 was that the LLamaEmbedder requires EmbeddingMode = true set. previously it would modify your config to set it, which wouldn't always be what you wanted (e.g. if the config is shared, that might get enabled without you realising it). Sounds like you've bumped into that.

how to use OpenCL backend

I'm not sure of the status, but I don't think OpenCL is available for LLamaSharp yet. Some initial work was done to add CLBLAST in 0.10.0, but (as far as I know) it's not shipped to nuget yet.

from llamasharp.

martindevans avatar martindevans commented on September 26, 2024

Since you'vce figured out the problem I'll close this issue :)

from llamasharp.

Related Issues (20)

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.