this post was submitted on 12 Nov 2023
1 points (100.0% liked)

LocalLLaMA

11 readers
4 users here now

Community to discuss about Llama, the family of large language models created by Meta AI.

founded 2 years ago
MODERATORS
 

Hello everyone; I am creating a chatbot that converts my text to JSON format, and it decides the fields/categories on its own. For the example below, it will convert the medical description to JSON

Example:
Patient John. Allergies to shellfish. 6 Feet, Previous Checkup. Chronic Backpain. Migraines Regular. Cane user. Sport Injury. 35 years. Visit 1 year go. Heavy Smoker previously. Fatigued. BMI above normal. Temp normal. On Ibuporofen. Skin rash, using topical cream.

Which lightweight model will be the best for this task?

you are viewing a single comment's thread
view the rest of the comments
[–] Love_Cat2023@alien.top 1 points 2 years ago

You may try the langchain create extraction chain api with code llama model, it should work well.
API link: https://python.langchain.com/docs/use_cases/extraction
Model link: https://huggingface.co/TheBloke/CodeLlama-7B-Instruct-GPTQ