lvyufeng / chatpdf Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
WSL ubuntu 22.04
git clone https://github.com/lvyufeng/chatpdf
cd chatpdf
conda create -n chatpdf python=3.9 -y
conda activate chatpdf
pip install -r requirements.txt
after all requirements have been satisfied, but hit memory malloc fails, as following output, while trying to run simple_ui.py
is there a minimum hbm memory requirement for the device? and i tried it within Orange Pi AI Pro device which has 16G memory.
Thanks!
root@orangepiaipro:/home/HwHiAiUser/llm/ChatPDF# python simple_ui.py
Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
Loading model cost 2.425 seconds.
Prefix dict has been built successfully.
2024-05-13 16:19:55.977 | INFO | __main__:<module>:32 - Namespace(gen_model_type='auto', gen_model_name='01-ai/Yi-6B-Chat', lora_model=None, rerank_model_name=None, corpus_files='sample.pdf', int4=False, int8=False, chunk_size=220, chunk_overlap=0, num_expand_context_chunk=1, server_name='0.0.0.0', server_port=8082, share=False)
Traceback (most recent call last):
File "/home/HwHiAiUser/llm/ChatPDF/simple_ui.py", line 34, in <module>
model = ChatPDF(
File "/home/HwHiAiUser/llm/ChatPDF/chatpdf.py", line 165, in __init__
m1 = BertSimilarity(model_name_or_path="shibing624/text2vec-base-multilingual")
File "/usr/local/miniconda3/lib/python3.9/site-packages/msimilarities/bert_similarity.py", line 49, in __init__
self.sentence_model = SentenceModel(
File "/usr/local/miniconda3/lib/python3.9/site-packages/ms2vec/sentence_model.py", line 76, in __init__
self.bert = AutoModel.from_pretrained(model_name_or_path)
File "/usr/local/miniconda3/lib/python3.9/site-packages/mindnlp/transformers/models/auto/auto_factory.py", line 100, in from_pretrained
return model_class.from_pretrained(
File "/usr/local/miniconda3/lib/python3.9/site-packages/mindnlp/transformers/modeling_utils.py", line 1037, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "/usr/local/miniconda3/lib/python3.9/site-packages/mindnlp/transformers/models/bert/modeling_bert.py", line 699, in __init__
self.embeddings = BertEmbeddings(config)
File "/usr/local/miniconda3/lib/python3.9/site-packages/mindnlp/transformers/models/bert/modeling_bert.py", line 118, in __init__
self.token_type_ids = ops.zeros(self.position_ids.shape, dtype=mindspore.int64)
File "/usr/local/miniconda3/lib/python3.9/site-packages/mindspore/common/_stub_tensor.py", line 85, in shape
self.stub_shape = self.stub.get_shape()
RuntimeError: Ascend kernel runtime initialization failed. The details refer to 'Ascend Error Message'.
----------------------------------------------------
- Framework Error Message:
----------------------------------------------------
Malloc device memory failed, free memory size is less than half of total memory size.Device 0 Device HBM total size:16367894528 Device HBM free size:5145612288 may be other processes occupying this card, check as: ps -ef|grep python
----------------------------------------------------
- C++ Call Stack: (For framework developers)
----------------------------------------------------
mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_kernel_runtime.cc:389 Init
mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_memory_adapter.cc:73 Initialize
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.