sunnychenxiwang commited on
Commit
00dd305
·
verified ·
1 Parent(s): 20ac0a1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +112 -3
README.md CHANGED
@@ -1,3 +1,112 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ base_model:
6
+ - Qwen/Qwen2.5-Coder-7B
7
+ ---
8
+
9
+
10
+ <div align="center">
11
+ <img src="logo.jpg" width="300px">
12
+
13
+ **OceanGPT(沧渊): A Large Language Model for Ocean Science Tasks**
14
+
15
+ <p align="center">
16
+ <a href="https://github.com/zjunlp/OceanGPT">Project</a> •
17
+ <a href="https://arxiv.org/abs/2310.02031">Paper</a> •
18
+ <a href="https://huggingface.co/collections/zjunlp/oceangpt-664cc106358fdd9f09aa5157">Models</a> •
19
+ <a href="http://oceangpt.zjukg.cn/">Web</a> •
20
+ <a href="#quickstart">Quickstart</a> •
21
+ <a href="#citation">Citation</a>
22
+ </p>
23
+
24
+ </div>
25
+
26
+ OceanGPT-coder is based on Qwen2.5-coder and has been trained on a hybrid synthetic code dataset in `moos` language.
27
+
28
+ Please note that the models and data in this repository are updated regularly to fix errors. The latest update date will be added to the README for your reference.
29
+
30
+ - ❗**We will continue to update.**
31
+ - ❗**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.**
32
+
33
+ ## ⏩Quickstart
34
+
35
+ ### Download the model
36
+
37
+ Download the model: [zjunlp/OceanGPT-coder-7B](https://huggingface.co/zjunlp/OceanGPT-coder-7B)
38
+
39
+ ```
40
+ git lfs install
41
+ git clone https://huggingface.co/zjunlp/OceanGPT-coder-7B
42
+ ```
43
+
44
+ or
45
+
46
+ ```
47
+ huggingface-cli download --resume-download zjunlp/OceanGPT-coder-7B --local-dir OceanGPT-coder-7B --local-dir-use-symlinks False
48
+ ```
49
+
50
+ ### Inference
51
+
52
+ ```python
53
+ from transformers import AutoModelForCausalLM, AutoTokenizer
54
+ model = AutoModelForCausalLM.from_pretrained(
55
+ "zjunlp/OceanGPT-coder-7B", torch_dtype=torch.float16, device_map="auto"
56
+ )
57
+ tokenizer = AutoTokenizer.from_pretrained("zjunlp/OceanGPT-coder-7B")
58
+ messages = [
59
+ {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
60
+ {"role": "user", "content": "请为水下机器人生成MOOS代码,实现如下任务:先回到(50,20)点,然后以(15,20)点为圆形,做半径为30的圆周运动,持续时间200s,速度4 m/s。"}
61
+ ]
62
+ text = tokenizer.apply_chat_template(
63
+ messages,
64
+ tokenize=False,
65
+ add_generation_prompt=True
66
+ )
67
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
68
+ generated_ids = model.generate(
69
+ **model_inputs,
70
+ top_p=0.6,
71
+ temperature=0.6,
72
+ max_new_tokens=2048
73
+ )
74
+ generated_ids = [
75
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
76
+ ]
77
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
78
+ print(response)
79
+ ```
80
+
81
+ ## 🌻Acknowledgement
82
+
83
+ 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).
84
+
85
+ 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).
86
+
87
+ Thanks for their great contributions!
88
+
89
+ ## Limitations
90
+
91
+ - The model may have hallucination issues.
92
+
93
+ - Due to limited computational resources, OceanGPT-coder currently only supports machine code in `moos` language.
94
+
95
+ - We did not optimize the identity and the model may generate identity information similar to that of Qwen/MiniCPM/LLaMA/GPT series models.
96
+
97
+ - The model's output is influenced by prompt tokens, which may result in inconsistent results across multiple attempts.
98
+
99
+ - 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.
100
+
101
+ ### 🚩Citation
102
+
103
+ Please cite the following paper if you use OceanGPT in your work.
104
+
105
+ ```bibtex
106
+ @article{bi2023oceangpt,
107
+ title={OceanGPT: A Large Language Model for Ocean Science Tasks},
108
+ author={Bi, Zhen and Zhang, Ningyu and Xue, Yida and Ou, Yixin and Ji, Daxiong and Zheng, Guozhou and Chen, Huajun},
109
+ journal={arXiv preprint arXiv:2310.02031},
110
+ year={2023}
111
+ }
112
+ ```