Commit d2a8cb42 authored by myhloli's avatar myhloli

docs(models-download): update steps and remove deprecated sectionsUpdate the...

docs(models-download): update steps and remove deprecated sectionsUpdate the model download instructions to reflect the current process, removing
unnecessary sections and simplifying the steps. The updated guide now includesclearer instructions on installing Git LFS, downloading models from Hugging Face,and additional checks for model file completeness. This change ensures that the
documentation is up-to-date and provides a streamlined experience for users
downloading models.
parent c723cc65
### Install Git LFS ### 1. Install Git LFS
Before you begin, make sure Git Large File Storage (Git LFS) is installed on your system. Install it using the following command: Before you begin, make sure Git Large File Storage (Git LFS) is installed on your system. Install it using the following command:
```bash ```bash
git lfs install git lfs install
``` ```
### Download the Model from Hugging Face ### 2. Download the Model from Hugging Face
To download the `PDF-Extract-Kit` model from Hugging Face, use the following command: To download the `PDF-Extract-Kit` model from Hugging Face, use the following command:
```bash ```bash
...@@ -14,35 +14,13 @@ git lfs clone https://huggingface.co/wanderkid/PDF-Extract-Kit ...@@ -14,35 +14,13 @@ git lfs clone https://huggingface.co/wanderkid/PDF-Extract-Kit
Ensure that Git LFS is enabled during the clone to properly download all large files. Ensure that Git LFS is enabled during the clone to properly download all large files.
### 3. Additional steps
#### 1. Check whether the model directory is downloaded completely.
### Download the Model from ModelScope The structure of the model folder is as follows, including configuration files and weight files of different components:
#### SDK Download
```bash
# First, install the ModelScope library using pip:
pip install modelscope
```
```python
# Use the following Python code to download the model using the ModelScope SDK:
from modelscope import snapshot_download
model_dir = snapshot_download('wanderkid/PDF-Extract-Kit')
```
#### Git Download
Alternatively, you can use Git to clone the model repository from ModelScope:
```bash
git lfs clone https://www.modelscope.cn/wanderkid/PDF-Extract-Kit.git
``` ```
../
Put [model files]() here:
```
./
├── Layout ├── Layout
│ ├── config.json │ ├── config.json
│ └── model_final.pth │ └── model_final.pth
...@@ -56,5 +34,22 @@ Put [model files]() here: ...@@ -56,5 +34,22 @@ Put [model files]() here:
│ ├── README.md │ ├── README.md
│ ├── tokenizer_config.json │ ├── tokenizer_config.json
│ └── tokenizer.json │ └── tokenizer.json
│── TabRec
│ └─StructEqTable
│ ├── config.json
│ ├── generation_config.json
│ ├── model.safetensors
│ ├── preprocessor_config.json
│ ├── special_tokens_map.json
│ ├── spiece.model
│ ├── tokenizer.json
│ └── tokenizer_config.json
└── README.md └── README.md
``` ```
#### 2. Check whether the model file is fully downloaded.
Please check whether the size of the model file in the directory is consistent with the description on the web page. If possible, it is best to check whether the model is downloaded completely through sha256.
#### 3. Move the model to the solid-state drive
Move the 'models' directory to a directory with large disk space, preferably on a solid-state drive (SSD). In addition, modify the model directory in `~/magic-pdf.json` to point to the final model storage location, otherwise the model cannot be loaded.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment