feat(medcat-llm-components): CPDT-108 Add llm components - #609
Conversation
tomolopolis
left a comment
There was a problem hiding this comment.
lgtm - nice - can you do the next stage of actually creating the model pack with a more up to date model and example prompt. gemma-3-1b is suitably small enough for people to run and get a hang of what's going on
This is based on the assumption that the actual LLM is running somewhere else (or could be running on the same machine but within some other process). So I can't really "build a model that uses it" without having an openly available endpoint to point at. This will always be up to the user to configure as far as I can tell. Perhaps there's room for LLMs running alongside medcat, but I thought separating these concerns would be an easier use case. EDIT: |
This adds LLM components.
The idea is to add these such that anyone can point this to an LLM and run that as part of the same MedCAT workflow.
I've built this as a separate package. I think that makes the most sense at this stage.
These are not meant as the best implementation that works for everything. They're meant as an example and a quick way to get going.
PS:
There's a few tests,
but I do need to run through a real world test as well. But wanted it up for CI.TODO:
Example with output for NER done remotely
The code:
https://gist.github.com/mart-r/2dee696a289b16d574750fcd172b24bc
The text:
The final output:
Example with output for linker done remotely
The code:
https://gist.github.com/mart-r/3d539395a5ea0ac039c4bf222132017d
The text:
The final output: