GithubHelp home page GithubHelp logo

Comments (7)

twentytwokhz avatar twentytwokhz commented on June 25, 2024 1

Thank you for clarifying!

from llamasharp.

martindevans avatar martindevans commented on June 25, 2024
var @params = new ModelParams(modelPath);
var embedder = new LLamaEmbedder(@params);
var result = embedder.GetEmbeddings("Hello");

This seems to work for me. result is filled with a load of numbers which are presumably the embedding vector of "Hello"

from llamasharp.

twentytwokhz avatar twentytwokhz commented on June 25, 2024

I might not have explained it accurately 🥲
After creating that vector how can I use it within LlamaSharp for an existing model?

from llamasharp.

martindevans avatar martindevans commented on June 25, 2024

I don't think LLamaSharp itself has anything that will consume embeddings, that's usually down to your own system (e.g. an external vector database). What are you actually trying to do with the embeddings?

from llamasharp.

twentytwokhz avatar twentytwokhz commented on June 25, 2024

I'm trying to get the embedding from a text extracted from a PDF File. I want to feed it into the llm model for a QA type bot

from llamasharp.

martindevans avatar martindevans commented on June 25, 2024

Maybe I'm misunderstanding what you're asking, but I don't think you'd feed the embeddings into the LLM. Instead you would retrieve some text (e.g. using a vector database to find knowledge "nearby" the question embedding vector) and then feed that into the context when you ask your question. That's not something LLamaSharp does - it'll do the start (generate embeddings) and the end (run the LLM) but not the middle bit (use the embeddings to retrieve some knowledge).

I know some people have been working on higher level things (e.g. BotSharp and SemanticKernel) which may do more of what you want (I'm not very familiar with those projects, so I'm not sure)

from llamasharp.

Oceania2018 avatar Oceania2018 commented on June 25, 2024

@twentytwokhz @martindevans Here is the updated docs related to how to adpot the LlamaSharp in a high level bot framework. I'll keep update the docs and let me know if you can run it through according the latest docs.

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.