h2oai / h2ogpt

Private chat with local GPT with document, images, video, etc. 100% private, Apache 2.0. Supports oLLaMa, Mixtral, llama.cpp, and more. Demo: https://gpt.h2o.ai/ https://gpt-docs.h2o.ai/
http://h2o.ai
Apache License 2.0
11.39k stars 1.25k forks source link

LangChain task list #134

Open pseudotensor opened 1 year ago

pseudotensor commented 1 year ago

Starting from: https://github.com/h2oai/h2ogpt/pull/111

Seems to be using caption model twice when uploaded long multi-files to UserData:

Overriding torch_dtype=None with `torch_dtype=torch.float16` due to requirements of `bitsandbytes` to enable model loading in mixed int8. Either pass torch_dtype=torch.float16 or don't pass this argument at all to remove this warning.
Loading checkpoint shards: 100%|██████████| 2/2 [00:10<00:00,  5.36s/it]
/home/jon/miniconda3/envs/h2ollm/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py:318: UserWarning: MatMul8bitLt: inputs will be cast from torch.float32 to float16 during quantization
  warnings.warn(f"MatMul8bitLt: inputs will be cast from {A.dtype} to float16 during quantization")
Overriding torch_dtype=None with `torch_dtype=torch.float16` due to requirements of `bitsandbytes` to enable model loading in mixed int8. Either pass torch_dtype=torch.float16 or don't pass this argument at all to remove this warning.
Loading checkpoint shards: 100%|██████████| 2/2 [00:08<00:00,  4.15s/it]

image

G-force78 commented 1 year ago

h20UI Was just about to post that I am not able to select the individual document in the UI, I see you have it on your list to implement. I hackily deleted tmp files under gradio as it kept answering about a machine learning idea and it did answer from the uploaded txt file (im using a collab notebook).

Which interaction method is best to query uploaded documents? prompt-answer, summarise etc?

pseudotensor commented 1 year ago

Hi @G-force78 , yes you can select only an individual document. Just click x near the drop-down icon so All becomes unselected, then select any number of documents, search by name, etc. Can be 1 document too.

As for what to put in the chat as prompt, whatever you like! Probably best is question/answer for a human.

G-force78 commented 1 year ago

Hi @G-force78 , yes you can select only an individual document. Just click x near the drop-down icon so All becomes unselected, then select any number of documents, search by name, etc. Can be 1 document too.

As for what to put in the chat as prompt, whatever you like! Probably best is question/answer for a human.

Sorry I meant what 'prompt type'? There are quite a few. When I asked it to summarize the document it basically just repeated it lol

pseudotensor commented 1 year ago

The vector search is very literal right now. If you ask "Summarize this document" that query won't match anything useful in the document selected.

So for now you should ask things like "What is the "named title" paper about? etc. Something semi-literal has to match in query and document for now.