zjunlp / OceanGPT-basic-4B-Thinking

huggingface.co
Total runs: 107
24-hour runs: 0
7-day runs: -1
30-day runs: 96
Model's Last Updated: December 29 2025
text-generation

Introduction of OceanGPT-basic-4B-Thinking

Model Details of OceanGPT-basic-4B-Thinking

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

Project Paper Models Web Quickstart Citation

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

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-4B-Thinking

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

or

huggingface-cli download --resume-download zjunlp/OceanGPT-basic-4B-Thinking --local-dir OceanGPT-basic-4B-Thinking --local-dir-use-symlinks False
Inference
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "zjunlp/OceanGPT-basic-4B-Thinking"

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

# prepare the model input
system_prompt = "你是海洋知识专家,负责解答各类海洋相关问题(You are a marine knowledge expert, responsible for answering all marine-related questions)."
question = "<Your Question>"
messages = [
    {"role": "system", "content": system_prompt},
    {"role": "user", "content": question}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

# conduct text completion
generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=4096
)
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

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

print("thinking content:", thinking_content) # no opening <think> tag
print("content:", 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}
}

Runs of zjunlp OceanGPT-basic-4B-Thinking on huggingface.co

107
Total runs
0
24-hour runs
0
3-day runs
-1
7-day runs
96
30-day runs

More Information About OceanGPT-basic-4B-Thinking huggingface.co Model

More OceanGPT-basic-4B-Thinking license Visit here:

https://choosealicense.com/licenses/mit

OceanGPT-basic-4B-Thinking huggingface.co

OceanGPT-basic-4B-Thinking huggingface.co is an AI model on huggingface.co that provides OceanGPT-basic-4B-Thinking's model effect (), which can be used instantly with this zjunlp OceanGPT-basic-4B-Thinking model. huggingface.co supports a free trial of the OceanGPT-basic-4B-Thinking model, and also provides paid use of the OceanGPT-basic-4B-Thinking. Support call OceanGPT-basic-4B-Thinking model through api, including Node.js, Python, http.

OceanGPT-basic-4B-Thinking huggingface.co Url

https://huggingface.co/zjunlp/OceanGPT-basic-4B-Thinking

zjunlp OceanGPT-basic-4B-Thinking online free

OceanGPT-basic-4B-Thinking huggingface.co is an online trial and call api platform, which integrates OceanGPT-basic-4B-Thinking's modeling effects, including api services, and provides a free online trial of OceanGPT-basic-4B-Thinking, you can try OceanGPT-basic-4B-Thinking online for free by clicking the link below.

zjunlp OceanGPT-basic-4B-Thinking online free url in huggingface.co:

https://huggingface.co/zjunlp/OceanGPT-basic-4B-Thinking

OceanGPT-basic-4B-Thinking install

OceanGPT-basic-4B-Thinking is an open source model from GitHub that offers a free installation service, and any user can find OceanGPT-basic-4B-Thinking on GitHub to install. At the same time, huggingface.co provides the effect of OceanGPT-basic-4B-Thinking install, users can directly use OceanGPT-basic-4B-Thinking installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

OceanGPT-basic-4B-Thinking install url in huggingface.co:

https://huggingface.co/zjunlp/OceanGPT-basic-4B-Thinking

Url of OceanGPT-basic-4B-Thinking

OceanGPT-basic-4B-Thinking huggingface.co Url

Provider of OceanGPT-basic-4B-Thinking huggingface.co

zjunlp
ORGANIZATIONS

Other API from zjunlp

huggingface.co

Total runs: 1.1K
Run Growth: 363
Growth Rate: 33.21%
Updated:March 04 2024
huggingface.co

Total runs: 589
Run Growth: -601
Growth Rate: -102.04%
Updated:March 04 2024
huggingface.co

Total runs: 36
Run Growth: -50
Growth Rate: -138.89%
Updated:May 06 2024
huggingface.co

Total runs: 16
Run Growth: -14
Growth Rate: -87.50%
Updated:March 21 2023
huggingface.co

Total runs: 11
Run Growth: 0
Growth Rate: 0.00%
Updated:October 01 2025
huggingface.co

Total runs: 10
Run Growth: 3
Growth Rate: 30.00%
Updated:October 01 2025
huggingface.co

Total runs: 3
Run Growth: 0
Growth Rate: 0.00%
Updated:July 28 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 22 2022
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 07 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 09 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 10 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 17 2023