ffy2000 commited on
Commit
1402c73
·
verified ·
1 Parent(s): 808ffe5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +42 -6
README.md CHANGED
@@ -228,21 +228,57 @@ Lance is a lightweight native unified multimodal model that supports **image and
228
  </table>
229
  </div>
230
 
231
- ## 🚀 Installation
232
 
233
- ### Recommended Environment
234
 
235
- - **Software:** Python 3.10+, CUDA 12.4+ (required)
236
- - **Hardware:** A GPU with at least 40GB VRAM is required for inference
 
 
 
 
237
 
238
- ### Installation Steps
239
  ```bash
240
  bash ./setup_env.sh
 
241
  ```
242
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  ### Download Model Weights
244
 
245
- Please download all the necessary model checkpoints of [Lance-3B (Huggingface Link)](https://huggingface.co/bytedance-research/Lance) and place them in the `downloads/` directory.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
 
247
  ## 📚 Usage
248
 
 
228
  </table>
229
  </div>
230
 
231
+ ### Installation Steps
232
 
233
+ First, clone the repository:
234
 
235
+ ```bash
236
+ git clone https://github.com/bytedance-seed/Lance.git
237
+ cd Lance
238
+ ```
239
+
240
+ #### Option 1: Automated Setup
241
 
 
242
  ```bash
243
  bash ./setup_env.sh
244
+ pip install flash-attn==2.8.3 --no-build-isolation
245
  ```
246
 
247
+ #### Option 2: Manual Setup (Recommended)
248
+ ```bash
249
+ conda create -n Lance python=3.11
250
+ pip3 install torch==2.5.1+cu124 torchvision==0.20.1+cu124 torchaudio==2.5.1+cu124 --index-url https://download.pytorch.org/whl/cu124
251
+ pip install -r requirements_full.txt
252
+ pip install flash-attn==2.8.3 --no-build-isolation
253
+ ```
254
+
255
+ > **Note:** If installing `flash-attn` from source fails, you can install the prebuilt wheel instead:
256
+ >
257
+ > ```bash
258
+ > pip install --no-cache-dir --no-deps --force-reinstall \
259
+ > "https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.3/flash_attn-2.8.3%2Bcu12torch2.5cxx11abiFALSE-cp311-cp311-linux_x86_64.whl"
260
+ > ```
261
+
262
+
263
  ### Download Model Weights
264
 
265
+ Please download all necessary model checkpoints from [Lance-3B on Hugging Face](https://huggingface.co/bytedance-research/Lance) and place them in the `downloads/` directory.
266
+
267
+ ```bash
268
+ from huggingface_hub import snapshot_download
269
+
270
+ save_dir = "./downloads/"
271
+ repo_id = "bytedance-research/Lance"
272
+ cache_dir = save_dir + "/cache"
273
+
274
+ snapshot_download(cache_dir=cache_dir,
275
+ local_dir=save_dir,
276
+ repo_id=repo_id,
277
+ local_dir_use_symlinks=False,
278
+ resume_download=True,
279
+ allow_patterns=["*.json", "*.safetensors", "*.bin", "*.py", "*.md", "*.txt","*.pth",],
280
+ )
281
+ ```
282
 
283
  ## 📚 Usage
284