Skip to content

A document-length QA model focusing on explainability. Side effect: infinite context length oops

Notifications You must be signed in to change notification settings

KipJM/SemanticLang

Repository files navigation

SemanticLangBanner Designed by me :3 (This image's not CC btw)

SemanticLang

A lightweight Q&A model designed to answer questions about long documents, with traceable deduction and evidence

Special tokens

GraphGen

  • <unused0>: <T> (Start of Triple (Subject))
  • <unused1>: <R> (Predicate)
  • <unused2>: <S> (Object)
  • <eos>: End of String

QueryGen

  • <unused10>: < (Keyword Start)
  • <unused11>: > (Keyword End)
  • <unused12>: { (Pattern Start)
  • <unused13>: } (Pattern End)
  • <unused14>: ? (Variable)
  • <unused15>: . (Seperator)

pre fine-tuned models

We have included the most recent (submission) model weights in the repository.
You may also train your own using the x_2b_train.ipynb documents.
Training data is included.

9b models (experimental)

Additionally, we fine-tuned 1 epoch models based on Gemma-2-9b. These models will not be part of the git repo (too big), but they can be found here(TBA).

graph-9b-full is fine-tuned on an Nvidia A100 for (4? haha idk it's still cooking) days. They have much higher accuracy than the previous demo model (graph-2b-1000step)

General usage

Run all in complete_integration.ipynb and respond as prompted. Everything else should work automatically. If you just want the answer (you probably don't) go to the bottom of the notebook. The final answer will be printed there.

Intermediate steps are printed and visualized throughout the document.

Graph.html is the generated graph if Jupyter breaks and refuses to display graphs again

About

A document-length QA model focusing on explainability. Side effect: infinite context length oops

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published