Closed pktCoder closed 1 year ago
It's not an error, just a warning, mentioned in FAQ. The Did not generate db since no sources
is the only relevant thing. Did you upload a pdf?
Thanks @pseudotensor for looking into it, Now I tried it again and got the following error. I guess it means my RTX 3070 doesn't support 4 bit operation?
$ conda activate h2ogpt
$ cd pkgs/h2ogpt/
$ python generate.py --base_model=h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v3 --hf_embedding_model=sentence-transformers/all-MiniLM-L6-v2 --score_model=None --load_4bit=True --langchain_mode='UserData'
Using Model h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v3
Prep: persist_directory=db_dir_UserData does not exist, regenerating
Did not generate db since no sources
Starting get_model: h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v3
Explicitly passing a `revision` is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a `revision` is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a `revision` is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.
device_map: {'': 0}
Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Traceback (most recent call last):
File "/home/ji03/pkgs/h2ogpt/generate.py", line 16, in <module>
entrypoint_main()
File "/home/ji03/pkgs/h2ogpt/generate.py", line 12, in entrypoint_main
fire.Fire(main)
File "/home/ji03/anaconda3/envs/h2ogpt/lib/python3.10/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/ji03/anaconda3/envs/h2ogpt/lib/python3.10/site-packages/fire/core.py", line 475, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/home/ji03/anaconda3/envs/h2ogpt/lib/python3.10/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/home/ji03/pkgs/h2ogpt/src/gen.py", line 730, in main
model0, tokenizer0, device = get_model(reward_type=False,
File "/home/ji03/pkgs/h2ogpt/src/gen.py", line 1074, in get_model
return get_hf_model(load_8bit=load_8bit,
File "/home/ji03/pkgs/h2ogpt/src/gen.py", line 1197, in get_hf_model
model = get_non_lora_model(base_model, model_loader, load_half, load_gptq, use_safetensors,
File "/home/ji03/pkgs/h2ogpt/src/gen.py", line 894, in get_non_lora_model
model = model_loader(
File "/home/ji03/anaconda3/envs/h2ogpt/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 466, in from_pretrained
return model_class.from_pretrained(
File "/home/ji03/anaconda3/envs/h2ogpt/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2629, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
TypeError: RWForCausalLM.__init__() got an unexpected keyword argument 'load_in_4bit'
I think it means your transformers is too old. Check with pip freeze | grep transformers
. Let me know.
Thanks pseudotensor for pointing it out. My transformers has version 4.28.1, after upgrading it to 4.31.0, it started to work.
H2oGPT looks very interesting, especially to a beginner like me. I hope to use it for telecommunication where it digests documents and we can quickly find answers (and reference in the document).
Here is my attempt to run it
On the web interface, I entered a general question "where to download LLM models" as a test, but got error
Any idea what may be wrong?
Thanks in advance!