Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements #308

Merged
merged 11 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions querent/config/core/gpt_llm_config.py

This file was deleted.

7 changes: 3 additions & 4 deletions querent/config/core/llm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pydantic import BaseModel, Field
from typing import List, Dict, Any, Optional
import os

from querent.config.engine.engine_config import EngineConfig

class LLM_Config(EngineConfig):
Expand All @@ -11,11 +10,11 @@ class LLM_Config(EngineConfig):
description: str = "An engine for NER and knowledge graph operations."
version: str = "0.0.1"
logger: str = "LLM.engine_config"
ner_model_name: str = "dbmdz/bert-large-cased-finetuned-conll03-english"
ner_model_name: str = "English"
spacy_model_path: str = 'en_core_web_lg'
nltk_path: str = '/model/nltk_data'
rel_model_type: str = 'llama'
rel_model_path: str = './tests/llama-2-7b-chat.Q5_K_M.gguf'
rel_model_type: str = 'bert'
rel_model_path: str = 'bert-base-uncased'
grammar_file_path: str = './querent/kg/rel_helperfunctions/json.gbnf'
emb_model_name: str = 'sentence-transformers/all-MiniLM-L6-v2'
user_context: str = Field(default="In a semantic triple (Subject, Predicate & Object) framework, determine which of the above entity is the subject and which is the object based on the context along with the predicate between these entities. Please also identify the subject type, object type & predicate type.")
Expand Down
2 changes: 1 addition & 1 deletion querent/config/core/opensource_llm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Opensource_LLM_Config(BaseModel):
version: str = "0.0.1"
logger: str = "RelationshipExtractor.engine_config"
model_type: str = 'llama'
model_path: str = './tests/llama-2-7b-chat.Q5_K_M.gguf'
model_path: str = ''
grammar_file_path: str = './querent/kg/rel_helperfunctions/json.gbnf'
qa_template: str = Field(default=None)
emb_model_name: str = 'sentence-transformers/all-MiniLM-L6-v2'
Expand Down
426 changes: 291 additions & 135 deletions querent/core/transformers/bert_ner_opensourcellm.py

Large diffs are not rendered by default.

195 changes: 0 additions & 195 deletions querent/core/transformers/fixed_entities_set_opensourcellm.py

This file was deleted.

Loading
Loading