diff --git a/tutorials/llm_clinical_trials/configs/ner_fewshot_mistral.cfg b/tutorials/llm_clinical_trials/configs/ner_fewshot_mistral.cfg new file mode 100644 index 00000000..440554c6 --- /dev/null +++ b/tutorials/llm_clinical_trials/configs/ner_fewshot_mistral.cfg @@ -0,0 +1,27 @@ +[nlp] +lang = "en" +pipeline = ["llm"] +batch_size = 128 + +[components] + +[components.llm] +factory = "llm" + +[components.llm.model] +@llm_models = "spacy.Mistral.v1" +name = "Mistral-7B-v0.1" + +[components.llm.task] +@llm_tasks = "spacy.NER.v3" +labels = ["Drug", "Dose"] +description = Entities are drugs or their doses. They can be uppercased, title-cased, or lowercased. + Each occurrence of an entity in the text should be extracted. + +[components.llm.task.label_definitions] +Drug = "A medicine or drug given to a patient as a treatment. Can be a generic name or brand name, e.g. paracetamol, Aspirin" +Dose = "The measured quantity (dose) of a certain medicine given to patients, e.g. 1mg. This should exclude the drug name." + +[components.llm.task.examples] +@misc = "spacy.FewShotReader.v1" +path = "configs/fewshot_drugs_dose.json" \ No newline at end of file diff --git a/tutorials/llm_clinical_trials/configs/ner_zeroshot_llama.cfg b/tutorials/llm_clinical_trials/configs/ner_zeroshot_llama.cfg new file mode 100644 index 00000000..27b4326b --- /dev/null +++ b/tutorials/llm_clinical_trials/configs/ner_zeroshot_llama.cfg @@ -0,0 +1,17 @@ +[nlp] +lang = "en" +pipeline = ["llm"] +batch_size = 128 + +[components] + +[components.llm] +factory = "llm" + +[components.llm.model] +@llm_models = "spacy.Llama2.v1" +name = "Llama-2-7b-hf" + +[components.llm.task] +@llm_tasks = "spacy.NER.v2" +labels = ["Drug", "Dose"] diff --git a/tutorials/llm_clinical_trials/configs/ner_zeroshot_mistral.cfg b/tutorials/llm_clinical_trials/configs/ner_zeroshot_mistral.cfg new file mode 100644 index 00000000..761e393c --- /dev/null +++ b/tutorials/llm_clinical_trials/configs/ner_zeroshot_mistral.cfg @@ -0,0 +1,17 @@ +[nlp] +lang = "en" +pipeline = ["llm"] +batch_size = 128 + +[components] + +[components.llm] +factory = "llm" + +[components.llm.model] +@llm_models = "spacy.Mistral.v1" +name = "Mistral-7B-v0.1" + +[components.llm.task] +@llm_tasks = "spacy.NER.v2" +labels = ["Drug", "Dose"]