Coder Social home page Coder Social logo

Comments (2)

philpax avatar philpax commented on May 19, 2024 1

Hey, thanks for reporting this! Just noticed now that we don't wire up loaded sessions to the REPL - that should be easy enough to fix.

With switching out the cached sessions per prompt, I think that'd be out of scope for the CLI, but that should be easy enough to implement. You can see that session loading is done here:

https://github.com/rustformers/llama-rs/blob/main/llama-cli/src/main.rs#L224-L244

and the REPL just runs in a loop, feeding the user prompt to the session:

https://github.com/rustformers/llama-rs/blob/main/llama-cli/src/main.rs#L21-L63

So all you'd have to do is load the model once, and for each session: load an existing session if required, run inference, and then persist the session back to disk.

from llm.

nsarrazin avatar nsarrazin commented on May 19, 2024

Thanks for the quick update!

I'll try to implement the switching of the cache myself, never worked with Rust but I'll give it a go it should be fun. Thanks for pointing me in the right direction.

from llm.

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.