Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot-swap LoRA with updated llama.cpp #212

Closed
3 of 5 tasks
ltoniazzi opened this issue Aug 19, 2024 · 3 comments · Fixed by #220
Closed
3 of 5 tasks

Hot-swap LoRA with updated llama.cpp #212

ltoniazzi opened this issue Aug 19, 2024 · 3 comments · Fixed by #220
Labels
enhancement New feature or request

Comments

@ltoniazzi
Copy link
Contributor

ltoniazzi commented Aug 19, 2024

Describe the feature

Feature

Since the PRs linked below in llama.cpp, it is possible to how-swap lora adapters. This allows to personalise NPCs and other GenAi game features by fine-tuning adapters that then can be quickly swapped on the same base model in memory.

Since llama.cpp has is being updated in #209. It would be nice to check how easily one can integrate this feature.

Todo list

  • bin files for adapters are now deprecated in favour of new gguf files, which should be ameneded in the documentation, if appearing.
  • Add in documentation link to how to convert adapters to gguf.
  • Add example on performing hot-swap
  • Test on using the new gguf formats should be run (I suspect the new adapter will automatically be used in hot-swapping mode)
  • Test using multiple adapters and hot swapping them, add code if needed, and add an example in the examples folder.

Related links

Hot lora PRs in llama.cpp:

Discord threads:

@ltoniazzi ltoniazzi added the enhancement New feature or request label Aug 19, 2024
@ltoniazzi ltoniazzi changed the title Hot swap lora with llama.cpp updated Hot swap lora with updated llama.cpp Aug 19, 2024
@ltoniazzi
Copy link
Contributor Author

I am happy to have a go at it 😃

@ltoniazzi ltoniazzi changed the title Hot swap lora with updated llama.cpp Hot-swap LoRA with updated llama.cpp Aug 19, 2024
@amakropoulos
Copy link
Collaborator

Wow thanks for the detailed request ⭐!
I implemented multiple loras and hot swapping in #210 . Do you want to have a look at it and let me know what you think?
I haven't added a sample or description in the Readme yet.

@amakropoulos
Copy link
Collaborator

I added a unit test for lora at #219 .
I'm adding some documentation and will release once I fix some build issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants