by riddleronroof on 10/30/23, 3:32 PM with 0 comments
However, once you know what you want, you should finetune and switch to your finetuned LLM.
Logos Shift Cloud handles this automatically
All you need is to add this to your call:
``` @logos_shift(dataset="story") def get_story(model, messages): """Generates a story""" completion = expensiveLLM.create(model=model, messages=messages) story_d = {'story': completion['choices'][0]['message']} return story_d ```
This will automatically log all inputs and outputs to this function unobtrusively. Once your model is ready, it will automatically A/B rollout your finetuned LLM.
No code changes necessary. Enjoy faster and cheaper results.
No proxies so you don't add one more dependency. The client code is open sourced at https://github.com/virevolai/logos-shift-client/ which includes the instrumentation, router for switching, and exactly how this works.
It's only 530 lines of code. No complex libraries.
If you do not want to use the Cloud solution, you can always just use Logos Shift for saving to local host and finetune yourself.
``` logos_shift = LogosShift(api_key=None, filename="api_calls.log") ```
Let us know how we can make this experience better.