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

Langchain integration #111

Merged
merged 112 commits into from
May 15, 2023
Merged

Langchain integration #111

merged 112 commits into from
May 15, 2023

Conversation

pseudotensor
Copy link
Collaborator

@pseudotensor pseudotensor commented May 4, 2023

  • basic isolated demo with OpenAI or HF/sentence_transformers
  • use better embedding and LLM (ours) to see if comparable to OpenAI
  • incorporate into chatbot with PDF upload
  • If well-chunked, extra chunking is not good idea, except to keep below (perhaps) slightly larger limit than chunk_size
  • Add pre-dB building for in-memory for now, not when user asks for response
  • Avoid re-downloading github etc. each time
  • Make chroma work, need to understand how to avoid dup docs and why fails when just load (missing items)
  • How to choose cut_distanct?
  • Context not added from chat when find sources. Maybe that's ok-ish, but need to do better.
  • Add docs: https://huggingface.co/databricks/dolly-v2-12b#langchain-usage
  • https://huggingface.co/datasets/Cohere/wikipedia-22-12/viewer/en/train
  • Fix context so doesn't do hard chop, do at human-bot instead.

Future PRs:

  • Make URL getting work
  • Can ground report more by showing matching words as well as matching n-grams from actual sources
  • Add ability to do new separate chat and go back to other chats
  • Add ability to download chat(s).
  • Consume url from chat itself and do look up
  • https://github.com/h2oai/makersaurus
  • Make All just mean look at all dbs
  • Allow any github link to ingest if not on HF. If on HF, default to h2oGPT and DAI docs.
  • Unsure how to work around [Bug]: Failed to Deploy in HuggingFace Spaces chroma-core/chroma#412 (comment)
  • Good or Bad for Flag, and Compare should be which is better

@pseudotensor
Copy link
Collaborator Author

pseudotensor commented May 9, 2023

Using sentence transformer + our 6.9B model, gives consistent answers.

query: Which config.toml enables pytorch for NLP?
answer: The following config.toml file enables PyTorch for NLP:

```
[nlp]
enable_pytorch_nlp_model = true
enable_pytorch_nlp_transformer = true
```

This file can be found in the `config` directory of the DriverlessAI documentation.
sources: ['nlp_settings.rst', 'nlp.rst', 'nlp_settings.rst', 'nlp_settings.rst']

Similar (previous one with sources mentioned in prompt but not actually present anymore) direct prompt in llama does well too:

image

@pseudotensor pseudotensor marked this pull request as ready for review May 15, 2023 15:26
@pseudotensor pseudotensor requested a review from arnocandel May 15, 2023 15:27
@pseudotensor pseudotensor requested a review from arnocandel May 15, 2023 21:12
@pseudotensor pseudotensor mentioned this pull request May 15, 2023
36 tasks
@pseudotensor
Copy link
Collaborator Author

============================================================================================= short test summary info =============================================================================================
FAILED tests/test_manual_test.py::test_chat_context - NotImplementedError: MANUAL TEST FOR NOW
=================================================================== 1 failed, 13 passed, 7 skipped, 1 xpassed, 9 warnings in 364.21s (0:06:04) ====================================================================
(h2ollm) jon@pseudotensor:~/h2o-llm$ 

and tested manual test manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants