Closed dok9612 closed 1 year ago
This is fixed in the latest version (0.2.4). Please update to the latest version and try again:
pip install 'chatdocs>=0.2.4'
i have same issue
(chatdocs-main) PS G:\Chat\chatdocs-main> chatdocs download
load INSTRUCTOR_Transformer
max_seq_length 512
Fetching 0 files: 0it [00:00, ?it/s]
Fetching 1 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<?, ?it/s]
error loading model: failed to open C:\Users\寰′付濂昞.cache\huggingface\hub\models--TheBloke--Wizard-Vicuna-7B-Uncensored-GGML\blobs\c31a4edd96527dcd808bcf9b99e3894065ac950747dac84ecd
415a2387454e7c: No such file or directory
llama_init_from_file: failed to load model
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ E:\chatdocs-main\lib\site-packages\chatdocs\main.py:26 in download │
│ │
│ 23 │ from .download import download │
│ 24 │ │
│ 25 │ config = get_config(config) │
│ ❱ 26 │ download(config=config) │
│ 27 │
│ 28 │
│ 29 @app.command() │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ config = { │ │
│ │ │ 'embeddings': {'model': 'hkunlp/instructor-large'}, │ │
│ │ │ 'llm': 'ctransformers', │ │
│ │ │ 'ctransformers': { │ │
│ │ │ │ 'model': 'TheBloke/Wizard-Vicuna-7B-Uncensored-GGML', │ │
│ │ │ │ 'model_file': 'Wizard-Vicuna-7B-Uncensored.ggmlv3.q4_0.bin', │ │
│ │ │ │ 'model_type': 'llama', │ │
│ │ │ │ 'config': {'context_length': 1024, 'local_files_only': False} │ │
│ │ │ }, │ │
│ │ │ 'huggingface': { │ │
│ │ │ │ 'model': 'TheBloke/Wizard-Vicuna-7B-Uncensored-HF', │ │
│ │ │ │ 'pipeline_kwargs': {'max_new_tokens': 256} │ │
│ │ │ }, │ │
│ │ │ 'gptq': { │ │
│ │ │ │ 'model': 'TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ', │ │
│ │ │ │ 'model_file': │ │
│ │ 'Wizard-Vicuna-7B-Uncensored-GPTQ-4bit-128g.no-act-order.safetensors', │ │
│ │ │ │ 'pipeline_kwargs': {'max_new_tokens': 256} │ │
│ │ │ }, │ │
│ │ │ 'download': False, │ │
│ │ │ 'host': 'localhost', │ │
│ │ │ 'port': 5000, │ │
│ │ │ 'auth': False, │ │
│ │ │ 'chroma': { │ │
│ │ │ │ 'persist_directory': 'db', │ │
│ │ │ │ 'chroma_db_impl': 'duckdb+parquet', │ │
│ │ │ │ 'anonymized_telemetry': False │ │
│ │ │ }, │ │
│ │ │ ... +1 │ │
│ │ } │ │
│ │ download = <function download at 0x000001F46E199790> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\chatdocs-main\lib\site-packages\chatdocs\download.py:10 in download │
│ │
│ 7 def download(config: Dict[str, Any]) -> None: │
│ 8 │ config = {config, "download": True} │
│ 9 │ get_embeddings(config) │
│ ❱ 10 │ get_llm(config) │
│ 11 │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ config = { │ │
│ │ │ 'embeddings': {'model': 'hkunlp/instructor-large'}, │ │
│ │ │ 'llm': 'ctransformers', │ │
│ │ │ 'ctransformers': { │ │
│ │ │ │ 'model': 'TheBloke/Wizard-Vicuna-7B-Uncensored-GGML', │ │
│ │ │ │ 'model_file': 'Wizard-Vicuna-7B-Uncensored.ggmlv3.q4_0.bin', │ │
│ │ │ │ 'model_type': 'llama', │ │
│ │ │ │ 'config': {'context_length': 1024, 'local_files_only': False} │ │
│ │ │ }, │ │
│ │ │ 'huggingface': { │ │
│ │ │ │ 'model': 'TheBloke/Wizard-Vicuna-7B-Uncensored-HF', │ │
│ │ │ │ 'pipeline_kwargs': {'max_new_tokens': 256} │ │
│ │ │ }, │ │
│ │ │ 'gptq': { │ │
│ │ │ │ 'model': 'TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ', │ │
│ │ │ │ 'model_file': │ │
│ │ 'Wizard-Vicuna-7B-Uncensored-GPTQ-4bit-128g.no-act-order.safetensors', │ │
│ │ │ │ 'pipeline_kwargs': {'max_new_tokens': 256} │ │
│ │ │ }, │ │
│ │ │ 'download': True, │ │
│ │ │ 'host': 'localhost', │ │
│ │ │ 'port': 5000, │ │
│ │ │ 'auth': False, │ │
│ │ │ 'chroma': { │ │
│ │ │ │ 'persist_directory': 'db', │ │
│ │ │ │ 'chroma_db_impl': 'duckdb+parquet', │ │
│ │ │ │ 'anonymized_telemetry': False │ │
│ │ │ }, │ │
│ │ │ ... +1 │ │
│ │ } │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\chatdocs-main\lib\site-packages\chatdocs\llms.py:73 in get_llm │
│ │
│ 70 │ if config["llm"] == "ctransformers": │
│ 71 │ │ config = {config["ctransformers"]} │
│ 72 │ │ config = merge(config, {"config": {"local_files_only": local_files_only}}) │
│ ❱ 73 │ │ llm = CTransformers(callbacks=callbacks, config) │
│ 74 │ elif config["llm"] == "gptq": │
│ 75 │ │ llm = get_gptq_llm(config) │
│ 76 │ else: │
│ │
│ ╭─────────────────────────────────────── locals ───────────────────────────────────────╮ │
│ │ callback = None │ │
│ │ CallbackHandler = <class 'chatdocs.llms.get_llm.
I'm getting this error when I type, "chatdocs download" in command prompt. What am I doing wrong?
C:\AI\chatdocs>chatdocs download load INSTRUCTOR_Transformer max_seq_length 512 Fetching 0 files: 0it [00:00, ?it/s] Fetching 1 files: 100%|█████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 999.36it/s] error loading model: unrecognized tensor type 10
llama_init_from_file: failed to load model ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ C:\Users\dkv9\miniconda3\lib\site-packages\chatdocs\main.py:26 in download │ │ │ │ 23 │ from .download import download │ │ 24 │ │ │ 25 │ config = get_config(config) │ │ ❱ 26 │ download(config=config) │ │ 27 │ │ 28 │ │ 29 @app.command() │ │ │ │ C:\Users\dkv9\miniconda3\lib\site-packages\chatdocs\download.py:10 in download │ │ │ │ 7 def download(config: Dict[str, Any]) -> None: │ │ 8 │ config = {config, "download": True} │ │ 9 │ get_embeddings(config) │ │ ❱ 10 │ get_llm(config) │ │ 11 │ │ │ │ C:\Users\dkv9\miniconda3\lib\site-packages\chatdocs\llms.py:73 in get_llm │ │ │ │ 70 │ if config["llm"] == "ctransformers": │ │ 71 │ │ config = {config["ctransformers"]} │ │ 72 │ │ config = merge(config, {"config": {"local_files_only": local_files_only}}) │ │ ❱ 73 │ │ llm = CTransformers(callbacks=callbacks, **config) │ │ 74 │ elif config["llm"] == "gptq": │ │ 75 │ │ llm = get_gptq_llm(config) │ │ 76 │ else: │ │ │ │ C:\AI\chatdocs\pydantic\main.py:339 in pydantic.main.BaseModel.init │ │ │ │ [Errno 2] No such file or directory: 'C:\AI\chatdocs\pydantic\main.py' │ │ │ │ C:\AI\chatdocs\pydantic\main.py:1102 in pydantic.main.validate_model │ │ │ │ [Errno 2] No such file or directory: 'C:\AI\chatdocs\pydantic\main.py' │ │ │ │ C:\Users\dkv9\miniconda3\lib\site-packages\langchain\llms\ctransformers.py:70 in │ │ validate_environment │ │ │ │ 67 │ │ │ ) │ │ 68 │ │ │ │ 69 │ │ config = values["config"] or {} │ │ ❱ 70 │ │ values["client"] = AutoModelForCausalLM.from_pretrained( │ │ 71 │ │ │ values["model"], │ │ 72 │ │ │ model_type=values["model_type"], │ │ 73 │ │ │ model_file=values["model_file"], │ │ │ │ C:\Users\dkv9\miniconda3\lib\site-packages\ctransformers\hub.py:157 in from_pretrained │ │ │ │ 154 │ │ │ │ local_files_only=local_files_only, │ │ 155 │ │ │ ) │ │ 156 │ │ │ │ ❱ 157 │ │ return LLM( │ │ 158 │ │ │ model_path=model_path, │ │ 159 │ │ │ model_type=model_type, │ │ 160 │ │ │ config=config.config, │ │ │ │ C:\Users\dkv9\miniconda3\lib\site-packages\ctransformers\llm.py:205 in init │ │ │ │ 202 │ │ │ config.gpu_layers, │ │ 203 │ │ ) │ │ 204 │ │ if self._llm is None: │ │ ❱ 205 │ │ │ raise RuntimeError( │ │ 206 │ │ │ │ f"Failed to create LLM '{model_type}' from '{model_path}'." │ │ 207 │ │ │ ) │ │ 208 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ RuntimeError: Failed to create LLM 'llama' from 'C:\Users\dkv9.cache\huggingface\hub\models--TheBloke--Wizard-Vicuna-7B-Uncensored-GGML\snapshots\531879da598ebc577cd4 a03bdde9fbe3a641fc63\Wizard-Vicuna-7B-Uncensored.ggmlv3.q2_K.bin'.