Skip to content

Commit ea88ff4

Browse files
committed
fix: temp ..
1 parent 5511cb7 commit ea88ff4

File tree

5 files changed

+408
-6
lines changed

5 files changed

+408
-6
lines changed

README.md

+69-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,24 @@
22

33
OpenGPT is an open-source cloud-native of large multi-modal models (LMMs).
44

5+
OpenGPT is an open-source cloud-native large multi-modal models (LMMs) serving solution.
6+
It is designed to simplify the deployment and management of large language models, on a distributed cluster of GPUs.
7+
58
**Warning**: This is an idea that I had and I wanted to try it out.
69
The design has not been implemented yet.
710
**The content of README.md is just a placeholder to remind me of what I want to do.**
811

12+
## Features
13+
14+
OpenGPT provides the following features to make it easy to deploy and serve large multi-modal models (LMMs) in production:
15+
16+
- Support for multi-modal models
17+
- Scalable architecture for handling high traffic loads
18+
- Optimized for low-latency inference
19+
- Automatic model partitioning and distribution across multiple GPUs
20+
- Centralized model management and monitoring
21+
- REST API for easy integration with existing applications
22+
923
You can learn more about OpenGPT’s [architecture in our documentation](https://opengpt.readthedocs.io/en/latest/).
1024

1125

@@ -142,6 +156,51 @@ response = requests.post(
142156
)
143157
```
144158

159+
## Kubernetes
160+
161+
To deploy OpenGPT on your Kubernetes cluster, follow these steps:
162+
163+
1. Install the OpenGPT operator on your Kubernetes cluster using Helm:
164+
165+
```bash
166+
helm install opengpt ./helm/opengpt --namespace opengpt
167+
```
168+
169+
2. Create a custom resource for your GPT model:
170+
171+
```YAML
172+
apiVersion: opengpt.io/v1alpha1
173+
kind: GptModel
174+
metadata:
175+
name: my-gpt-model
176+
namespace: opengpt
177+
spec:
178+
modelPath: s3://my-bucket/my-model
179+
modelName: my-model
180+
maxBatchSize: 16
181+
inputShape:
182+
- 1024
183+
- 1024
184+
- 3
185+
outputShape:
186+
- 1024
187+
- 1024
188+
- 3
189+
190+
```
191+
192+
3. Apply the custom resource to your cluster:
193+
194+
```bash
195+
kubectl apply -f my-gpt-model.yaml
196+
```
197+
198+
4. Monitor the status of your GPT model using the OpenGPT dashboard:
199+
200+
```bash
201+
kubectl port-forward -n opengpt svc/opengpt-dashboard 8080:80
202+
```
203+
145204
## Accessing models via API
146205

147206
You can also access the online models via API. To do so, you can use the `inference_client` package:
@@ -209,4 +268,13 @@ Specifically, we implement the following fine-tuning methods:
209268

210269
## Documentation
211270

212-
For more information, check out the [documentation](https://opengpt.readthedocs.io/en/latest/).
271+
For more information, check out the [documentation](https://opengpt.readthedocs.io/en/latest/).
272+
273+
274+
## Contributing
275+
276+
We welcome contributions from the community! To contribute, please submit a pull request following our contributing guidelines.
277+
278+
## License
279+
280+
OpenGPT is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

opengpt/factory.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def create_model_and_transforms(
4040

4141
model_config = {
4242
'clip_model_name': 'ViT-L-14::openai',
43-
'lang_model_name_or_path': 'facebook/opt-1.3b',
44-
'tokenizer_name_or_path': 'facebook/opt-1.3b',
43+
'lang_model_name_or_path': 'llama_7B',
44+
'tokenizer_name_or_path': 'llama_7B',
4545
}
4646
return load_model_and_transforms(**model_config)
4747
else:

opengpt/helper.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
def get_envs():
2+
from torch.utils import collect_env
3+
4+
return collect_env.get_pretty_env_info()

pyproject.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,17 @@ build-backend = "poetry.core.masonry.api"
3838
[tool.poetry.dependencies]
3939
# Compatible Python versions
4040
python = ">=3.8"
41-
torch = ">=1.9.0" # a meta device requires torch >= 1.9.0
41+
torch = ">=1.9.0,<2.0.0" # a meta device requires torch >= 1.9.0
4242
click = "^8.1.3"
4343
numpy = "^1.21.2"
4444
einops = "^0.6.0"
4545
transformers = "^4.12.5"
46-
open_clip_torch = "^2.16.0"
46+
open_clip_torch = "~2.16.0"
47+
accelerate = "^0.18.0"
4748

4849
# A list of all of the optional dependencies, some of which are included in the
4950
# below `extras`. They can be opted into by apps.
50-
open-flamingo = { version = "^0.0.2", optional = true }
51+
open-flamingo = { version = "^0.0", optional = true }
5152

5253
[tool.poetry.extras]
5354
flamingo = ["open-flamingo"]

0 commit comments

Comments
 (0)