sleepysoft / easy-langchain-lkb Goto Github PK
View Code? Open in Web Editor NEWThe simplest Local Knowledge Base example based on Langchain and Chat-GLM
The simplest Local Knowledge Base example based on Langchain and Chat-GLM
Loading /data/lailai_file/bigmodel/model_hub/chatglm-6b-int4 requires to execute some code in that repo, you can inspect the content of the repository at https://hf.co//data/lailai_file/bigmodel/model_hub/chatglm-6b-int4. You can dismiss this prompt by passing trust_remote_code=True
.
Do you accept? [y/N] y
No compiled kernel found.
Compiling kernels : /home/server2/.cache/huggingface/modules/transformers_modules/chatglm-6b-int4/quantization_kernels_parallel.c
Compiling gcc -O3 -fPIC -pthread -fopenmp -std=c99 /home/server2/.cache/huggingface/modules/transformers_modules/chatglm-6b-int4/quantization_kernels_parallel.c -shared -o /home/server2/.cache/huggingface/modules/transformers_modules/chatglm-6b-int4/quantization_kernels_parallel.so
Load kernel : /home/server2/.cache/huggingface/modules/transformers_modules/chatglm-6b-int4/quantization_kernels_parallel.so
Setting CPU quantization kernel threads to 28
Using quantization cache
Applying quantization to glm layers
Tokenizer class ChatGLMTokenizer does not exist or is not currently imported.
Traceback (most recent call last):
File "/data/lailai_file/bigmodel/Easy-Langchain-LKB/main.py", line 246, in
main()
File "/data/lailai_file/bigmodel/Easy-Langchain-LKB/main.py", line 198, in main
embedding = setup_embedding()
File "/data/lailai_file/bigmodel/Easy-Langchain-LKB/main.py", line 134, in setup_embedding
embeddings = HuggingFaceEmbeddings(
File "/home/server2/anaconda3/envs/lcglm/lib/python3.10/site-packages/langchain/embeddings/huggingface.py", line 65, in init
self.client = sentence_transformers.SentenceTransformer(
File "/home/server2/anaconda3/envs/lcglm/lib/python3.10/site-packages/sentence_transformers/SentenceTransformer.py", line 97, in init
modules = self._load_auto_model(model_path)
File "/home/server2/anaconda3/envs/lcglm/lib/python3.10/site-packages/sentence_transformers/SentenceTransformer.py", line 806, in _load_auto_model
transformer_model = Transformer(model_name_or_path)
File "/home/server2/anaconda3/envs/lcglm/lib/python3.10/site-packages/sentence_transformers/models/Transformer.py", line 31, in init
self.tokenizer = AutoTokenizer.from_pretrained(tokenizer_name_or_path if tokenizer_name_or_path is not None else model_name_or_path, cache_dir=cache_dir, **tokenizer_args)
File "/home/server2/anaconda3/envs/lcglm/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 688, in from_pretrained
raise ValueError(
ValueError: Tokenizer class ChatGLMTokenizer does not exist or is not currently imported.
楼主,谢谢您的项目付出,但是我运行main.py遇到了上面的问题,请问一下您有这个错误的解决方案吗?
一开始报错
Could not import faiss python package. Please install it with pip install faiss
or pip install faiss-cpu
(depending on Python version).
init() got an unexpected keyword argument 'autodetect_encoding'
按照提示
pip install faiss-cpu
安装了 faiss之后依然报错
Error in faiss::FileIOReader::FileIOReader(const char*) at /project/faiss/faiss/impl/io.cpp:67: Error: 'f' failed: could not open vector_store/index.faiss for reading: No such file or directory
init() got an unexpected keyword argument 'autodetect_encoding'
请问有什么解决办法吗?
运行main.py文件后出现safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge的错误,请问有解决方法吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.