OceanGPT(沧渊): A Large Language Model for Ocean Science Tasks

ProjectPaperModelsWebQuickstartCitation

OceanGPT-basic is based on Qwen3 and has been trained on an English and Chinese dataset in the ocean domain (recent update 20250506) .

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.

  • We will continue to update.
  • 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.

⏩Quickstart

Download the model

Download the model: zjunlp/OceanGPT-basic-8B

git lfs install
git clone https://huggingface.co/zjunlp/OceanGPT-basic-8B

or

huggingface-cli download --resume-download zjunlp/OceanGPT-basic-8B --local-dir OceanGPT-basic-8B --local-dir-use-symlinks False

Inference

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "zjunlp/OceanGPT-basic-8B"

# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)

question = "<Your Question>"
messages = [
    {"role": "user", "content": question}
]

text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
    enable_thinking=False
)

model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

# conduct text completion
generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=8192
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist() 

# parsing thinking content
try:
    # rindex finding 151668 (</think>)
    index = len(output_ids) - output_ids[::-1].index(151668)
except ValueError:
    index = 0

content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")

print(content)

🌻Acknowledgement

OceanGPT (沧渊) is trained based on the open-sourced large language models including Qwen, MiniCPM, LLaMA.

OceanGPT is trained based on the open-sourced data and tools including Moos, UATD, Forward-looking Sonar Detection Dataset, NKSID, SeabedObjects-KLSG, Marine Debris.

Thanks for their great contributions!

Limitations

  • The model may have hallucination issues.

  • We did not optimize the identity and the model may generate identity information similar to that of Qwen/MiniCPM/LLaMA/GPT series models.

  • The model's output is influenced by prompt tokens, which may result in inconsistent results across multiple attempts.

  • 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.

🚩Citation

Please cite the following paper if you use OceanGPT in your work.

@article{bi2023oceangpt,
  title={OceanGPT: A Large Language Model for Ocean Science Tasks},
  author={Bi, Zhen and Zhang, Ningyu and Xue, Yida and Ou, Yixin and Ji, Daxiong and Zheng, Guozhou and Chen, Huajun},
  journal={arXiv preprint arXiv:2310.02031},
  year={2023}
}
Downloads last month
23
Safetensors
Model size
8.19B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for zjunlp/OceanGPT-basic-8B

Base model

Qwen/Qwen3-8B-Base
Finetuned
Qwen/Qwen3-8B
Finetuned
(71)
this model
Quantizations
2 models

Collection including zjunlp/OceanGPT-basic-8B