Linaqruf commited on
Commit
78c2c4d
Β·
verified Β·
1 Parent(s): 2552a53

Upload 6 files

Browse files
Files changed (3) hide show
  1. README.md +212 -210
  2. app.py +15 -53
  3. requirements.txt +4 -0
README.md CHANGED
@@ -1,210 +1,212 @@
1
- ---
2
- license: apache-2.0
3
- title: Modelscope Migration
4
- sdk: gradio
5
- emoji: πŸš€
6
- colorFrom: red
7
- short_description: Migrate your models to modelscope
8
- sdk_version: 6.2.0
9
- ---
10
- # πŸš€ HuggingFace to ModelScope Migration Tool
11
-
12
- A user-friendly Gradio application for migrating models and datasets from [HuggingFace](https://huggingface.co/) to [ModelScope](https://www.modelscope.cn/).
13
-
14
- ## ✨ Features
15
-
16
- - **Easy Migration**: Migrate models and datasets with a simple web interface
17
- - **Secure Authentication**: Supports token-based authentication for both platforms
18
- - **Progress Tracking**: Real-time status updates during migration
19
- - **Flexible Configuration**: Customize repository visibility, license, and metadata
20
- - **Error Handling**: Comprehensive error messages and validation
21
- - **Automatic Cleanup**: Temporary files are automatically cleaned up after migration
22
-
23
- ## πŸ“‹ Prerequisites
24
-
25
- - Python 3.8 or higher
26
- - Internet connection
27
- - HuggingFace account and access token
28
- - ModelScope account and SDK token
29
-
30
- ## πŸ”§ Installation
31
-
32
- 1. Clone this repository:
33
- ```bash
34
- git clone <repository-url>
35
- cd modelscope-migration
36
- ```
37
-
38
- 2. Install dependencies:
39
- ```bash
40
- pip install -r requirements.txt
41
- ```
42
-
43
- Or install manually:
44
- ```bash
45
- pip install gradio huggingface-hub modelscope
46
- ```
47
-
48
- ## πŸš€ Quick Start
49
-
50
- 1. Run the application:
51
- ```bash
52
- python app.py
53
- ```
54
-
55
- 2. Open your browser and navigate to the provided URL (usually `http://localhost:7860`)
56
-
57
- 3. Fill in the required information:
58
- - **HuggingFace Token**: Get from https://huggingface.co/settings/tokens
59
- - **ModelScope Token**: Get from https://www.modelscope.cn/my/myaccesstoken
60
- - **Source Repository**: The HuggingFace repository ID (e.g., `bert-base-uncased`)
61
- - **Destination Repository**: Your desired ModelScope repository ID (e.g., `username/my-model`)
62
-
63
- 4. Click "Start Migration" and wait for completion
64
-
65
- ## πŸ“– Usage Guide
66
-
67
- ### Getting Your Tokens
68
-
69
- #### HuggingFace Token:
70
- 1. Go to https://huggingface.co/settings/tokens
71
- 2. Click "New token"
72
- 3. Give it a name and select appropriate permissions
73
- 4. Copy the token (starts with `hf_`)
74
-
75
- #### ModelScope Token:
76
- 1. Go to https://www.modelscope.cn/my/myaccesstoken
77
- 2. Log in to your account
78
- 3. Copy your SDK token
79
-
80
- ### Migration Options
81
-
82
- | Option | Description | Default |
83
- |--------|-------------|---------|
84
- | **Repository Type** | Choose between `model` or `dataset` | `model` |
85
- | **Visibility** | Set repository as `public` or `private` | `public` |
86
- | **License** | Choose from Apache 2.0, MIT, GPL-3.0, or Other | `apache-2.0` |
87
- | **Chinese Name** | Optional Chinese name for the repository | None |
88
-
89
- ### Example Repository IDs
90
-
91
- **HuggingFace:**
92
- - `bert-base-uncased` (official model)
93
- - `username/my-custom-model` (user model)
94
- - `datasets/squad` (dataset)
95
-
96
- **ModelScope:**
97
- - `username/repo-name` (always requires username prefix)
98
-
99
- ## πŸ› οΈ How It Works
100
-
101
- The migration process follows these steps:
102
-
103
- 1. **Authentication**: Validates tokens for both HuggingFace and ModelScope
104
- 2. **Download**: Uses `snapshot_download` to download the entire repository from HuggingFace
105
- 3. **Upload**: Creates repository on ModelScope (if needed) and uploads all files
106
- 4. **Cleanup**: Removes temporary files from local storage
107
-
108
- ## πŸ“ Features in Detail
109
-
110
- ### Model Migration
111
-
112
- Migrates complete model repositories including:
113
- - Model weights and configuration files
114
- - Tokenizer files
115
- - README and documentation
116
- - Any additional files in the repository
117
-
118
- ### Dataset Migration
119
-
120
- Migrates dataset repositories including:
121
- - Dataset files (all formats)
122
- - Dataset cards and metadata
123
- - Scripts and configuration files
124
-
125
- ### Error Handling
126
-
127
- The tool provides clear error messages for:
128
- - Invalid tokens
129
- - Repository not found
130
- - Permission errors
131
- - Network issues
132
- - Disk space problems
133
-
134
- ## ⚠️ Important Notes
135
-
136
- - **Disk Space**: Ensure you have enough disk space for temporary storage of the repository
137
- - **Large Models**: Migration time depends on repository size and network speed
138
- - **Permissions**: Your tokens must have appropriate read/write permissions
139
- - **Private Repos**: To migrate private repositories, ensure your HuggingFace token has access
140
- - **Repository Creation**: The tool automatically creates the ModelScope repository if it doesn't exist
141
-
142
- ## πŸ”’ Security
143
-
144
- - Tokens are handled securely and not logged
145
- - Tokens are entered as password fields (hidden input)
146
- - Temporary files are cleaned up after migration
147
- - No data is stored permanently on the server
148
-
149
- ## πŸ› Troubleshooting
150
-
151
- ### "Authentication failed"
152
- - Verify your tokens are correct and not expired
153
- - Check that you're using the right token for each platform
154
-
155
- ### "Download failed"
156
- - Ensure the HuggingFace repository exists and is accessible
157
- - Check your internet connection
158
- - Verify you have permission to access the repository
159
-
160
- ### "Upload failed"
161
- - Verify your ModelScope token has write permissions
162
- - Check that the destination repository name is valid
163
- - Ensure you're not exceeding ModelScope's quotas
164
-
165
- ### "Disk space error"
166
- - Free up disk space on your system
167
- - Large models require significant temporary storage
168
-
169
- ## πŸ“š API Documentation
170
-
171
- ### HuggingFace Hub
172
- - Documentation: https://huggingface.co/docs/huggingface_hub
173
- - PyPI: https://pypi.org/project/huggingface-hub/
174
-
175
- ### ModelScope
176
- - GitHub: https://github.com/modelscope/modelscope
177
- - PyPI: https://pypi.org/project/modelscope/
178
-
179
- ## 🀝 Contributing
180
-
181
- Contributions are welcome! Please feel free to submit issues or pull requests.
182
-
183
- ## πŸ“„ License
184
-
185
- This project is open source and available under the Apache 2.0 License.
186
-
187
- ## πŸ”— Resources
188
-
189
- - [HuggingFace Hub](https://huggingface.co/)
190
- - [ModelScope Platform](https://www.modelscope.cn/)
191
- - [Gradio Documentation](https://gradio.app/docs/)
192
-
193
- ## πŸ’‘ Tips
194
-
195
- 1. **Test with small models first**: Before migrating large models, test with a smaller repository
196
- 2. **Check licenses**: Ensure you have the right to migrate and redistribute the model/dataset
197
- 3. **Preserve metadata**: The tool preserves all files, but review the ModelScope repository after migration
198
- 4. **Network stability**: For large repositories, ensure a stable internet connection
199
-
200
- ## πŸ†˜ Support
201
-
202
- If you encounter issues:
203
- 1. Check the troubleshooting section above
204
- 2. Review the error message in the status output
205
- 3. Verify your tokens and repository IDs
206
- 4. Check the official documentation for HuggingFace and ModelScope
207
-
208
- ---
209
-
210
- Made with ❀️ using [Gradio](https://gradio.app/), [HuggingFace Hub](https://huggingface.co/), and [ModelScope](https://www.modelscope.cn/)
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ title: Modelscope Migration
4
+ sdk: gradio
5
+ emoji: πŸš€
6
+ colorFrom: red
7
+ colorTo: blue
8
+ short_description: Migrate your models to modelscope
9
+ sdk_version: 6.2.0
10
+ ---
11
+
12
+ # πŸš€ HuggingFace to ModelScope Migration Tool
13
+
14
+ A user-friendly Gradio application for migrating models and datasets from [HuggingFace](https://huggingface.co/) to [ModelScope](https://www.modelscope.cn/).
15
+
16
+ ## ✨ Features
17
+
18
+ - **Easy Migration**: Migrate models and datasets with a simple web interface
19
+ - **Secure Authentication**: Supports token-based authentication for both platforms
20
+ - **Progress Tracking**: Real-time status updates during migration
21
+ - **Flexible Configuration**: Customize repository visibility, license, and metadata
22
+ - **Error Handling**: Comprehensive error messages and validation
23
+ - **Automatic Cleanup**: Temporary files are automatically cleaned up after migration
24
+
25
+ ## πŸ“‹ Prerequisites
26
+
27
+ - Python 3.8 or higher
28
+ - Internet connection
29
+ - HuggingFace account and access token
30
+ - ModelScope account and SDK token
31
+
32
+ ## πŸ”§ Installation
33
+
34
+ 1. Clone this repository:
35
+ ```bash
36
+ git clone <repository-url>
37
+ cd modelscope-migration
38
+ ```
39
+
40
+ 2. Install dependencies:
41
+ ```bash
42
+ pip install -r requirements.txt
43
+ ```
44
+
45
+ Or install manually:
46
+ ```bash
47
+ pip install gradio huggingface-hub modelscope
48
+ ```
49
+
50
+ ## πŸš€ Quick Start
51
+
52
+ 1. Run the application:
53
+ ```bash
54
+ python app.py
55
+ ```
56
+
57
+ 2. Open your browser and navigate to the provided URL (usually `http://localhost:7860`)
58
+
59
+ 3. Fill in the required information:
60
+ - **HuggingFace Token**: Get from https://huggingface.co/settings/tokens
61
+ - **ModelScope Token**: Get from https://www.modelscope.cn/my/myaccesstoken
62
+ - **Source Repository**: The HuggingFace repository ID (e.g., `bert-base-uncased`)
63
+ - **Destination Repository**: Your desired ModelScope repository ID (e.g., `username/my-model`)
64
+
65
+ 4. Click "Start Migration" and wait for completion
66
+
67
+ ## πŸ“– Usage Guide
68
+
69
+ ### Getting Your Tokens
70
+
71
+ #### HuggingFace Token:
72
+ 1. Go to https://huggingface.co/settings/tokens
73
+ 2. Click "New token"
74
+ 3. Give it a name and select appropriate permissions
75
+ 4. Copy the token (starts with `hf_`)
76
+
77
+ #### ModelScope Token:
78
+ 1. Go to https://www.modelscope.cn/my/myaccesstoken
79
+ 2. Log in to your account
80
+ 3. Copy your SDK token
81
+
82
+ ### Migration Options
83
+
84
+ | Option | Description | Default |
85
+ |--------|-------------|---------|
86
+ | **Repository Type** | Choose between `model` or `dataset` | `model` |
87
+ | **Visibility** | Set repository as `public` or `private` | `public` |
88
+ | **License** | Choose from Apache 2.0, MIT, GPL-3.0, or Other | `apache-2.0` |
89
+ | **Chinese Name** | Optional Chinese name for the repository | None |
90
+
91
+ ### Example Repository IDs
92
+
93
+ **HuggingFace:**
94
+ - `bert-base-uncased` (official model)
95
+ - `username/my-custom-model` (user model)
96
+ - `datasets/squad` (dataset)
97
+
98
+ **ModelScope:**
99
+ - `username/repo-name` (always requires username prefix)
100
+
101
+ ## πŸ› οΈ How It Works
102
+
103
+ The migration process follows these steps:
104
+
105
+ 1. **Authentication**: Validates tokens for both HuggingFace and ModelScope
106
+ 2. **Download**: Uses `snapshot_download` to download the entire repository from HuggingFace
107
+ 3. **Upload**: Creates repository on ModelScope (if needed) and uploads all files
108
+ 4. **Cleanup**: Removes temporary files from local storage
109
+
110
+ ## πŸ“ Features in Detail
111
+
112
+ ### Model Migration
113
+
114
+ Migrates complete model repositories including:
115
+ - Model weights and configuration files
116
+ - Tokenizer files
117
+ - README and documentation
118
+ - Any additional files in the repository
119
+
120
+ ### Dataset Migration
121
+
122
+ Migrates dataset repositories including:
123
+ - Dataset files (all formats)
124
+ - Dataset cards and metadata
125
+ - Scripts and configuration files
126
+
127
+ ### Error Handling
128
+
129
+ The tool provides clear error messages for:
130
+ - Invalid tokens
131
+ - Repository not found
132
+ - Permission errors
133
+ - Network issues
134
+ - Disk space problems
135
+
136
+ ## ⚠️ Important Notes
137
+
138
+ - **Disk Space**: Ensure you have enough disk space for temporary storage of the repository
139
+ - **Large Models**: Migration time depends on repository size and network speed
140
+ - **Permissions**: Your tokens must have appropriate read/write permissions
141
+ - **Private Repos**: To migrate private repositories, ensure your HuggingFace token has access
142
+ - **Repository Creation**: The tool automatically creates the ModelScope repository if it doesn't exist
143
+
144
+ ## πŸ”’ Security
145
+
146
+ - Tokens are handled securely and not logged
147
+ - Tokens are entered as password fields (hidden input)
148
+ - Temporary files are cleaned up after migration
149
+ - No data is stored permanently on the server
150
+
151
+ ## πŸ› Troubleshooting
152
+
153
+ ### "Authentication failed"
154
+ - Verify your tokens are correct and not expired
155
+ - Check that you're using the right token for each platform
156
+
157
+ ### "Download failed"
158
+ - Ensure the HuggingFace repository exists and is accessible
159
+ - Check your internet connection
160
+ - Verify you have permission to access the repository
161
+
162
+ ### "Upload failed"
163
+ - Verify your ModelScope token has write permissions
164
+ - Check that the destination repository name is valid
165
+ - Ensure you're not exceeding ModelScope's quotas
166
+
167
+ ### "Disk space error"
168
+ - Free up disk space on your system
169
+ - Large models require significant temporary storage
170
+
171
+ ## πŸ“š API Documentation
172
+
173
+ ### HuggingFace Hub
174
+ - Documentation: https://huggingface.co/docs/huggingface_hub
175
+ - PyPI: https://pypi.org/project/huggingface-hub/
176
+
177
+ ### ModelScope
178
+ - GitHub: https://github.com/modelscope/modelscope
179
+ - PyPI: https://pypi.org/project/modelscope/
180
+
181
+ ## 🀝 Contributing
182
+
183
+ Contributions are welcome! Please feel free to submit issues or pull requests.
184
+
185
+ ## πŸ“„ License
186
+
187
+ This project is open source and available under the Apache 2.0 License.
188
+
189
+ ## πŸ”— Resources
190
+
191
+ - [HuggingFace Hub](https://huggingface.co/)
192
+ - [ModelScope Platform](https://www.modelscope.cn/)
193
+ - [Gradio Documentation](https://gradio.app/docs/)
194
+
195
+ ## πŸ’‘ Tips
196
+
197
+ 1. **Test with small models first**: Before migrating large models, test with a smaller repository
198
+ 2. **Check licenses**: Ensure you have the right to migrate and redistribute the model/dataset
199
+ 3. **Preserve metadata**: The tool preserves all files, but review the ModelScope repository after migration
200
+ 4. **Network stability**: For large repositories, ensure a stable internet connection
201
+
202
+ ## πŸ†˜ Support
203
+
204
+ If you encounter issues:
205
+ 1. Check the troubleshooting section above
206
+ 2. Review the error message in the status output
207
+ 3. Verify your tokens and repository IDs
208
+ 4. Check the official documentation for HuggingFace and ModelScope
209
+
210
+ ---
211
+
212
+ Made with ❀️ using [Gradio](https://gradio.app/), [HuggingFace Hub](https://huggingface.co/), and [ModelScope](https://www.modelscope.cn/)
app.py CHANGED
@@ -20,42 +20,20 @@ class MigrationTool:
20
  """Handles migration of models and datasets between HuggingFace and ModelScope."""
21
 
22
  def __init__(self):
23
- self.hf_api = None
24
- self.ms_api = None
25
- self.ms_token = None
26
  self.temp_dir = None
27
 
28
- def authenticate_hf(self, token: str) -> Tuple[bool, str]:
29
- """Authenticate with HuggingFace."""
30
- try:
31
- self.hf_api = HfApi(token=token)
32
- # Test the token
33
- self.hf_api.whoami(token=token)
34
- return True, "βœ“ HuggingFace authentication successful"
35
- except Exception as e:
36
- return False, f"βœ— HuggingFace authentication failed: {str(e)}"
37
-
38
- def authenticate_ms(self, token: str) -> Tuple[bool, str]:
39
- """Authenticate with ModelScope."""
40
- try:
41
- # Store the token and create HubApi instance
42
- # We'll authenticate when actually using the API
43
- self.ms_token = token
44
- self.ms_api = HubApi()
45
- return True, "βœ“ ModelScope token stored successfully"
46
- except Exception as e:
47
- return False, f"βœ— ModelScope initialization failed: {str(e)}"
48
-
49
  def download_from_hf(
50
  self,
51
  repo_id: str,
52
- repo_type: str = "model"
 
53
  ) -> Tuple[bool, str, Optional[str]]:
54
  """Download a repository from HuggingFace.
55
 
56
  Args:
57
  repo_id: HuggingFace repository ID (e.g., 'username/repo-name')
58
  repo_type: Type of repository ('model' or 'dataset')
 
59
 
60
  Returns:
61
  Tuple of (success, message, local_path)
@@ -70,7 +48,7 @@ class MigrationTool:
70
  repo_type=repo_type,
71
  local_dir=self.temp_dir,
72
  local_dir_use_symlinks=False,
73
- token=self.hf_api.token if self.hf_api else None
74
  )
75
 
76
  return True, f"βœ“ Successfully downloaded {repo_type} from HuggingFace", local_path
@@ -81,6 +59,7 @@ class MigrationTool:
81
  self,
82
  local_path: str,
83
  repo_id: str,
 
84
  repo_type: str = "model",
85
  visibility: str = "public",
86
  license_type: str = "apache-2.0",
@@ -91,6 +70,7 @@ class MigrationTool:
91
  Args:
92
  local_path: Local path to the repository
93
  repo_id: ModelScope repository ID (e.g., 'username/repo-name')
 
94
  repo_type: Type of repository ('model' or 'dataset')
95
  visibility: Repository visibility ('public' or 'private')
96
  license_type: License type
@@ -100,14 +80,9 @@ class MigrationTool:
100
  Tuple of (success, message)
101
  """
102
  try:
103
- if not self.ms_api or not hasattr(self, 'ms_token'):
104
- return False, "βœ— ModelScope not authenticated"
105
-
106
- # Login with the stored token
107
- try:
108
- self.ms_api.login(self.ms_token)
109
- except Exception as login_error:
110
- return False, f"βœ— ModelScope login failed: {str(login_error)}"
111
 
112
  # Determine visibility
113
  vis = ModelVisibility.PUBLIC if visibility == "public" else ModelVisibility.PRIVATE
@@ -124,7 +99,7 @@ class MigrationTool:
124
  # Create repository if it doesn't exist
125
  try:
126
  if repo_type == "model":
127
- self.ms_api.create_model(
128
  model_id=repo_id,
129
  visibility=vis,
130
  license=lic,
@@ -136,13 +111,13 @@ class MigrationTool:
136
 
137
  # Push the model/dataset
138
  if repo_type == "model":
139
- self.ms_api.push_model(
140
  model_id=repo_id,
141
  model_dir=local_path
142
  )
143
  else:
144
  # For datasets, use similar approach
145
- self.ms_api.push_model(
146
  model_id=repo_id,
147
  model_dir=local_path
148
  )
@@ -185,23 +160,9 @@ class MigrationTool:
185
  if not hf_repo_id or not ms_repo_id:
186
  return "βœ— Error: Both source and destination repository IDs are required"
187
 
188
- # Authenticate with HuggingFace
189
- output.append("πŸ” Authenticating with HuggingFace...")
190
- success, msg = self.authenticate_hf(hf_token)
191
- output.append(msg)
192
- if not success:
193
- return "\n".join(output)
194
-
195
- # Authenticate with ModelScope
196
- output.append("\nπŸ” Authenticating with ModelScope...")
197
- success, msg = self.authenticate_ms(ms_token)
198
- output.append(msg)
199
- if not success:
200
- return "\n".join(output)
201
-
202
  # Download from HuggingFace
203
- output.append(f"\n⬇️ Downloading {repo_type} from HuggingFace: {hf_repo_id}...")
204
- success, msg, local_path = self.download_from_hf(hf_repo_id, repo_type)
205
  output.append(msg)
206
  if not success:
207
  self.cleanup()
@@ -212,6 +173,7 @@ class MigrationTool:
212
  success, msg = self.upload_to_ms(
213
  local_path,
214
  ms_repo_id,
 
215
  repo_type,
216
  visibility,
217
  license_type,
 
20
  """Handles migration of models and datasets between HuggingFace and ModelScope."""
21
 
22
  def __init__(self):
 
 
 
23
  self.temp_dir = None
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  def download_from_hf(
26
  self,
27
  repo_id: str,
28
+ repo_type: str = "model",
29
+ token: Optional[str] = None
30
  ) -> Tuple[bool, str, Optional[str]]:
31
  """Download a repository from HuggingFace.
32
 
33
  Args:
34
  repo_id: HuggingFace repository ID (e.g., 'username/repo-name')
35
  repo_type: Type of repository ('model' or 'dataset')
36
+ token: HuggingFace authentication token
37
 
38
  Returns:
39
  Tuple of (success, message, local_path)
 
48
  repo_type=repo_type,
49
  local_dir=self.temp_dir,
50
  local_dir_use_symlinks=False,
51
+ token=token
52
  )
53
 
54
  return True, f"βœ“ Successfully downloaded {repo_type} from HuggingFace", local_path
 
59
  self,
60
  local_path: str,
61
  repo_id: str,
62
+ token: str,
63
  repo_type: str = "model",
64
  visibility: str = "public",
65
  license_type: str = "apache-2.0",
 
70
  Args:
71
  local_path: Local path to the repository
72
  repo_id: ModelScope repository ID (e.g., 'username/repo-name')
73
+ token: ModelScope authentication token
74
  repo_type: Type of repository ('model' or 'dataset')
75
  visibility: Repository visibility ('public' or 'private')
76
  license_type: License type
 
80
  Tuple of (success, message)
81
  """
82
  try:
83
+ # Create HubApi instance and login
84
+ api = HubApi()
85
+ api.login(token)
 
 
 
 
 
86
 
87
  # Determine visibility
88
  vis = ModelVisibility.PUBLIC if visibility == "public" else ModelVisibility.PRIVATE
 
99
  # Create repository if it doesn't exist
100
  try:
101
  if repo_type == "model":
102
+ api.create_model(
103
  model_id=repo_id,
104
  visibility=vis,
105
  license=lic,
 
111
 
112
  # Push the model/dataset
113
  if repo_type == "model":
114
+ api.push_model(
115
  model_id=repo_id,
116
  model_dir=local_path
117
  )
118
  else:
119
  # For datasets, use similar approach
120
+ api.push_model(
121
  model_id=repo_id,
122
  model_dir=local_path
123
  )
 
160
  if not hf_repo_id or not ms_repo_id:
161
  return "βœ— Error: Both source and destination repository IDs are required"
162
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  # Download from HuggingFace
164
+ output.append(f"⬇️ Downloading {repo_type} from HuggingFace: {hf_repo_id}...")
165
+ success, msg, local_path = self.download_from_hf(hf_repo_id, repo_type, hf_token)
166
  output.append(msg)
167
  if not success:
168
  self.cleanup()
 
173
  success, msg = self.upload_to_ms(
174
  local_path,
175
  ms_repo_id,
176
+ ms_token,
177
  repo_type,
178
  visibility,
179
  license_type,
requirements.txt CHANGED
@@ -1,3 +1,7 @@
1
  gradio>=4.0.0
2
  huggingface-hub>=0.20.0
3
  modelscope>=1.11.0
 
 
 
 
 
1
  gradio>=4.0.0
2
  huggingface-hub>=0.20.0
3
  modelscope>=1.11.0
4
+
5
+ # Performance optimization for faster downloads/uploads
6
+ hf_transfer # Faster upload/download with Rust-based backend
7
+ hf_xet # XetHub integration for efficient model transfers