Skip to content

Commit

Permalink
some additional OS configs (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
svlandeg committed Jan 19, 2024
1 parent 6a141a2 commit c8914dc
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tutorials/llm_clinical_trials/configs/ner_fewshot_mistral.cfg
Original file line number Diff line number Diff line change
@@ -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"
17 changes: 17 additions & 0 deletions tutorials/llm_clinical_trials/configs/ner_zeroshot_llama.cfg
Original file line number Diff line number Diff line change
@@ -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"]
17 changes: 17 additions & 0 deletions tutorials/llm_clinical_trials/configs/ner_zeroshot_mistral.cfg
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit c8914dc

Please sign in to comment.