CoolFace
Modelpublic

zjunlp/OceanGPT-basic-30B-A3B-Thinking

sourceHugging Facemitupdated 9mo agoView on Hugging Face
1likes16downloads
README.md136 linesDownload Raw Back to root
1---2license: mit3pipeline_tag: text-generation4tags:5- ocean6- text-generation-inference7- oceangpt8language:9- en10- zh11base_model:12- Qwen/Qwen3-30B-A3B-Thinking-250713---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.blue/">Web</a> •24  <a href="#quickstart">Quickstart</a> •25  <a href="#citation">Citation</a>26</p>27 28</div>29 30OceanGPT-basic is based on Qwen3 and has been trained on an English and Chinese dataset in the ocean domain (**recent update 20251215**).31 32The model is trained using **Huawei Ascend AI 910B**.33 34Please 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.35 36- ❗**We will continue to update.**37- ❗**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.**38 39## ⏩Quickstart40 41### Download the model42 43Download the model: [zjunlp/OceanGPT-basic-30B-A3B-Thinking](https://huggingface.co/zjunlp/OceanGPT-basic-30B-A3B-Thinking)44 45```46git lfs install47git clone https://huggingface.co/zjunlp/OceanGPT-basic-30B-A3B-Thinking48```49 50or51 52```53huggingface-cli download --resume-download zjunlp/OceanGPT-basic-30B-A3B-Thinking --local-dir OceanGPT-basic-30B-A3B-Thinking --local-dir-use-symlinks False54```55 56### Inference57 58```python59from transformers import AutoModelForCausalLM, AutoTokenizer60 61model_name = "zjunlp/OceanGPT-basic-30B-A3B-Thinking"62 63# load the tokenizer and the model64tokenizer = AutoTokenizer.from_pretrained(model_name)65model = AutoModelForCausalLM.from_pretrained(66    model_name,67    torch_dtype="auto",68    device_map="auto"69)70 71# prepare the model input72system_prompt = "你是海洋知识专家,负责解答各类海洋相关问题(You are a marine knowledge expert, responsible for answering all marine-related questions)."73question = "<Your Question>"74messages = [75    {"role": "system", "content": system_prompt},76    {"role": "user", "content": question}77]78text = tokenizer.apply_chat_template(79    messages,80    tokenize=False,81    add_generation_prompt=True,82)83model_inputs = tokenizer([text], return_tensors="pt").to(model.device)84 85# conduct text completion86generated_ids = model.generate(87    **model_inputs,88    max_new_tokens=409689)90output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist() 91 92# parsing thinking content93try:94    # rindex finding 151668 (</think>)95    index = len(output_ids) - output_ids[::-1].index(151668)96except ValueError:97    index = 098 99thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")100content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")101 102print("thinking content:", thinking_content) # no opening <think> tag103print("content:", content)104 105```106 107## 🌻Acknowledgement108 109OceanGPT (沧渊) 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).110 111OceanGPT 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).112 113Thanks for their great contributions!114 115## Limitations116 117- The model may have hallucination issues.118 119- We did not optimize the identity and the model may generate identity information similar to that of Qwen/MiniCPM/LLaMA/GPT series models.120 121- The model's output is influenced by prompt tokens, which may result in inconsistent results across multiple attempts.122 123- 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.124 125### 🚩Citation126 127Please cite the following paper if you use OceanGPT in your work.128 129```bibtex130@article{bi2023oceangpt,131  title={OceanGPT: A Large Language Model for Ocean Science Tasks},132  author={Bi, Zhen and Zhang, Ningyu and Xue, Yida and Ou, Yixin and Ji, Daxiong and Zheng, Guozhou and Chen, Huajun},133  journal={arXiv preprint arXiv:2310.02031},134  year={2023}135}136```