Skip to content

misc registry (spacy version 3.6.1) #12970

@TongmengXie

Description

@TongmengXie

How to reproduce the behaviour

from spacy_llm.util import assemble
nlp_falcon = assemble("/content/drive/MyDrive/WorkDir/Histo_link/model/base_config_llm.cfg")

base_config_llm.cfg:

[nlp]
lang = "en"
pipeline = ["llm"]

[components]

[components.llm]
factory = "llm"

[components.llm.task]
# @llm_tasks = "spacy.SpanCat.v2"
@llm_tasks = "spacy.NER.v2"
# labels = ["INVENTOR", "ADDRESS"]
labels = INVENTOR,ADDRESS

[components.llm.task.label_definitions]

INVENTOR = "The individual who created a patent or invention. This is typically a proper name like 'JOHN GNAGEE,' usually accompanied by terms like 'OF,' followed by an address."
ADDRESS = "The location where the inventor resides, often a series of words including street, city, and sometimes county, separated by commas or other punctuation. May appear in sequences like 'OF 6 LINGFIELD ROAD, WIMBLEDON IN THE COUNTY OF SURREY"

[components.llm.task.examples]
@readers = "spacy.FewShotReader.v1"
path = /content/drive/MyDrive/WorkDir/Histo_link/model/few_shot_NER.yml

[components.llm.model]
@llm_models = "spacy.Falcon.v1"
name = "falcon-rw-1b"
# @llm_models = "spacy.Dolly.v1"
# name = "dolly-v2-3b"

Your Environment

  • Operating System: Colab
  • Python Version Used: 3.10
  • spaCy Version Used: 3.6.1
  • Environment Information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat/llmFeature: LLMs (incl. spacy-llm)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions