Skip to content

Instantly share code, notes, and snippets.

@pszemraj
Last active January 1, 2022 03:40
Show Gist options
  • Save pszemraj/16f2ca3e0683877e6fc0b8cba3c613f4 to your computer and use it in GitHub Desktop.
Save pszemraj/16f2ca3e0683877e6fc0b8cba3c613f4 to your computer and use it in GitHub Desktop.
HayStack Course Info Extractor - IML s21.ipynb

AutoTA Example

  • A series of transformer models that embed your course documents, search for them when you ask it a question, and construct a reply in coherent english using a text2text generator.
  • Based on the work done by deepset.ai in their Haystack library.
  • As the notebook preview does not always load on GitHub, click here for the Colab notebook / demo. Instructions are provided on what to edit to use the notebook both in simple cases (i.e. just changing the questions) to adapting the notebook for other purposes.

Example: The model's explanation of K-Means

question to model: What is the k-means algorithm?

model response:

("'the k means algorithm is one of the most popular iterative descent clustering methods intended for situations in which all variables are of the quantitative type, and that for each such assignment there is a unique optimum for the k pk, the algorithm must converge after a finite number of iterations. it is not clear that the hard assignment to the nearest cluster is the most appropriate. since the assignment of observations to clusters at any iteration is a perturbation of that for the previous iteration, only a very small fraction of all possible assignments. however, these algorithms converge to local optima which may be highly suboptimal when compared to the global optimum. in the present invention, the convergence properties of these algorithms are studied and it is shown that if the algorithm converges to a local maximum of l, this will correspond to a global maximum of the log likelihood function; and so in this incremental algorithm is increasing the value of l and if the result no longer changes, a local optimum has been reached.'")


Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment