model
Browse files- .gitattributes +9 -0
- README.md +3 -137
- chat_template.json +3 -0
- config.json +3 -0
- generation_config.json +3 -0
- merges.txt +3 -0
- model.safetensors.index.json +3 -0
- special_tokens_map.json +3 -0
- tokenizer.json +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,12 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
chat_template.json filter=lfs diff=lfs merge=lfs -text
|
37 |
+
model.safetensors.index.json filter=lfs diff=lfs merge=lfs -text
|
38 |
+
README.md filter=lfs diff=lfs merge=lfs -text
|
39 |
+
special_tokens_map.json filter=lfs diff=lfs merge=lfs -text
|
40 |
+
config.json filter=lfs diff=lfs merge=lfs -text
|
41 |
+
generation_config.json filter=lfs diff=lfs merge=lfs -text
|
42 |
+
merges.txt filter=lfs diff=lfs merge=lfs -text
|
43 |
+
model-00004-of-00004.safetensors filter=lfs diff=lfs merge=lfs -text
|
44 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,137 +1,3 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
tags:
|
5 |
-
- ocean
|
6 |
-
- text-generation-inference
|
7 |
-
- oceangpt
|
8 |
-
language:
|
9 |
-
- en
|
10 |
-
datasets:
|
11 |
-
- zjunlp/OceanInstruct
|
12 |
-
---
|
13 |
-
|
14 |
-
<div align="center">
|
15 |
-
<img src="logo.jpg" width="300px">
|
16 |
-
|
17 |
-
**OceanGPT(沧渊): A Large Language Model for Ocean Science Tasks**
|
18 |
-
|
19 |
-
<p align="center">
|
20 |
-
<a href="https://github.com/zjunlp/OceanGPT">Project</a> •
|
21 |
-
<a href="https://arxiv.org/abs/2310.02031">Paper</a> •
|
22 |
-
<a href="https://huggingface.co/collections/zjunlp/oceangpt-664cc106358fdd9f09aa5157">Models</a> •
|
23 |
-
<a href="http://oceangpt.zjukg.cn/">Web</a> •
|
24 |
-
<a href="#quickstart">Quickstart</a> •
|
25 |
-
<a href="#citation">Citation</a>
|
26 |
-
</p>
|
27 |
-
|
28 |
-
</div>
|
29 |
-
|
30 |
-
OceanGPT-o is based on Qwen2.5-VL and has been trained on an English and Chinese dataset in the ocean domain.
|
31 |
-
|
32 |
-
- ❗**We will continue to update.**
|
33 |
-
- ❗**Disclaimer: This project is purely an academic exploration rather than a product. Please be aware that due to the inherent limitations of large language models, there may be issues such as hallucinations.**
|
34 |
-
|
35 |
-
## ⏩Quickstart
|
36 |
-
|
37 |
-
### Download the model
|
38 |
-
|
39 |
-
Download the model: [zjunlp/OceanGPT-o-7B](https://huggingface.co/zjunlp/OceanGPT-o-7B)
|
40 |
-
|
41 |
-
```
|
42 |
-
git lfs install
|
43 |
-
git clone https://huggingface.co/zjunlp/OceanGPT-o-7B
|
44 |
-
```
|
45 |
-
|
46 |
-
or
|
47 |
-
|
48 |
-
```
|
49 |
-
huggingface-cli download --resume-download zjunlp/OceanGPT-o-7B --local-dir OceanGPT-o-7B --local-dir-use-symlinks False
|
50 |
-
```
|
51 |
-
|
52 |
-
Qwen2.5-VL offers a toolkit to help you handle various types of visual input more conveniently, as if you were using an API. This includes base64, URLs, and interleaved images and videos. You can install it using the following command:
|
53 |
-
|
54 |
-
```
|
55 |
-
# It's highly recommanded to use `[decord]` feature for faster video loading.
|
56 |
-
pip install qwen-vl-utils[decord]==0.0.8
|
57 |
-
```
|
58 |
-
|
59 |
-
### Inference
|
60 |
-
|
61 |
-
```python
|
62 |
-
from transformers import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor
|
63 |
-
from qwen_vl_utils import process_vision_info
|
64 |
-
|
65 |
-
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
66 |
-
"zjunlp/OceanGPT-o-7B", torch_dtype=torch.bfloat16, device_map="auto"
|
67 |
-
)
|
68 |
-
processor = AutoProcessor.from_pretrained("zjunlp/OceanGPT-o-7B")
|
69 |
-
|
70 |
-
messages = [
|
71 |
-
{
|
72 |
-
"role": "user",
|
73 |
-
"content": [
|
74 |
-
{
|
75 |
-
"type": "image",
|
76 |
-
"image": "file:///path/to/your/image.jpg",
|
77 |
-
},
|
78 |
-
{"type": "text", "text": "Describe this image."},
|
79 |
-
],
|
80 |
-
}
|
81 |
-
]
|
82 |
-
|
83 |
-
text = processor.apply_chat_template(
|
84 |
-
messages, tokenize=False, add_generation_prompt=True
|
85 |
-
)
|
86 |
-
image_inputs, video_inputs = process_vision_info(messages)
|
87 |
-
inputs = processor(
|
88 |
-
text=[text],
|
89 |
-
images=image_inputs,
|
90 |
-
videos=video_inputs,
|
91 |
-
padding=True,
|
92 |
-
return_tensors="pt",
|
93 |
-
)
|
94 |
-
inputs = inputs.to("cuda")
|
95 |
-
|
96 |
-
generated_ids = model.generate(**inputs, max_new_tokens=128)
|
97 |
-
generated_ids_trimmed = [
|
98 |
-
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
|
99 |
-
]
|
100 |
-
output_text = processor.batch_decode(
|
101 |
-
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
|
102 |
-
)
|
103 |
-
print(output_text)
|
104 |
-
```
|
105 |
-
|
106 |
-
## 🌻Acknowledgement
|
107 |
-
|
108 |
-
OceanGPT (沧渊) is trained based on the open-sourced large language models including [Qwen](https://huggingface.co/Qwen), [MiniCPM](https://huggingface.co/collections/openbmb/minicpm-2b-65d48bf958302b9fd25b698f), [LLaMA](https://huggingface.co/meta-llama).
|
109 |
-
|
110 |
-
OceanGPT is trained based on the open-sourced data and tools including [Moos](https://github.com/moos-tutorials), [UATD](https://openi.pcl.ac.cn/OpenOrcinus_orca/URPC2021_sonar_images_dataset), [Forward-looking Sonar Detection Dataset](https://github.com/XingYZhu/Forward-looking-Sonar-Detection-Dataset), [NKSID](https://github.com/Jorwnpay/NK-Sonar-Image-Dataset), [SeabedObjects-KLSG](https://github.com/huoguanying/SeabedObjects-Ship-and-Airplane-dataset), [Marine Debris](https://github.com/mvaldenegro/marine-debris-fls-datasets/tree/master/md_fls_dataset/data/turntable-cropped).
|
111 |
-
|
112 |
-
Thanks for their great contributions!
|
113 |
-
|
114 |
-
## Limitations
|
115 |
-
|
116 |
-
- The model may have hallucination issues.
|
117 |
-
|
118 |
-
- Due to limited computational resources, OceanGPT-o currently only supports natural language generation for certain types of sonar images and ocean science images.
|
119 |
-
|
120 |
-
- We did not optimize the identity and the model may generate identity information similar to that of Qwen/MiniCPM/LLaMA/GPT series models.
|
121 |
-
|
122 |
-
- The model's output is influenced by prompt tokens, which may result in inconsistent results across multiple attempts.
|
123 |
-
|
124 |
-
- The model requires the inclusion of specific simulator code instructions for training in order to possess simulated embodied intelligence capabilities (the simulator is subject to copyright restrictions and cannot be made available for now), and its current capabilities are quite limited.
|
125 |
-
|
126 |
-
### 🚩Citation
|
127 |
-
|
128 |
-
Please cite the following paper if you use OceanGPT in your work.
|
129 |
-
|
130 |
-
```bibtex
|
131 |
-
@article{bi2023oceangpt,
|
132 |
-
title={OceanGPT: A Large Language Model for Ocean Science Tasks},
|
133 |
-
author={Bi, Zhen and Zhang, Ningyu and Xue, Yida and Ou, Yixin and Ji, Daxiong and Zheng, Guozhou and Chen, Huajun},
|
134 |
-
journal={arXiv preprint arXiv:2310.02031},
|
135 |
-
year={2023}
|
136 |
-
}
|
137 |
-
```
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9f5c48dc63cf7e7626f7a95d410f932e6679d9f6accc9c56372d64f9c06ea1d9
|
3 |
+
size 5078
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chat_template.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:94174d7176c52a7192f96fc34eb2cf23c7c2059d63cdbfadca1586ba89731fb7
|
3 |
+
size 1049
|
config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8b971bcdf05d439a0fdb0856593043955189491a08849a733767ba2493646f57
|
3 |
+
size 1229
|
generation_config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1d9ca13a7e852b1c81de44f6f92f46b7c18e8f7eec293631f4a79f6f6fe10806
|
3 |
+
size 244
|
merges.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5
|
3 |
+
size 1671853
|
model.safetensors.index.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3067e9b0f35596ff3426a0d0ec8c982a51fa1e110c4fc30dcf3be9ea37409df6
|
3 |
+
size 57619
|
special_tokens_map.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd
|
3 |
+
size 613
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
|
3 |
+
size 11421896
|