Downloads · 30 days
72
10% of all-time downloads
zjunlp/OceanGPT-o-7B
OceanGPT-o-7B is a text generation model from zjunlp. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
<div align="center" <img src="logo.jpg" width="300px"
Downloads · 30 days
72
10% of all-time downloads
All-time downloads
721
Public
Parameters
8.3B
33.2 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors16.6 GB · 100%
From the Hugging Face model README
OceanGPT(沧渊): A Large Language Model for Ocean Science Tasks
<p align="center"> <a href="https://github.com/zjunlp/OceanGPT">Project</a> • <a href="https://arxiv.org/abs/2310.02031">Paper</a> • <a href="https://huggingface.co/collections/zjunlp/oceangpt-664cc106358fdd9f09aa5157">Models</a> • <a href="http://oceangpt.zjukg.cn/">Web</a> • <a href="#quickstart">Quickstart</a> • <a href="#citation">Citation</a> </p> </div>OceanGPT-o is based on Qwen2.5-VL and has been trained on an English and Chinese dataset in the ocean domain (recent update 20250514) .
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.
Download the model: zjunlp/OceanGPT-o-7B
git lfs install
git clone https://huggingface.co/zjunlp/OceanGPT-o-7B
or
huggingface-cli download --resume-download zjunlp/OceanGPT-o-7B --local-dir OceanGPT-o-7B --local-dir-use-symlinks False
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:
# It's highly recommanded to use `[decord]` feature for faster video loading.
pip install qwen-vl-utils[decord]==0.0.8
from transformers import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor
from qwen_vl_utils import process_vision_info
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
"zjunlp/OceanGPT-o-7B", torch_dtype=torch.bfloat16, device_map="auto"
)
processor = AutoProcessor.from_pretrained("zjunlp/OceanGPT-o-7B")
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "file:///path/to/your/image.jpg",
},
{"type": "text", "text": "Describe this image."},
],
}
]
text = processor.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
text=[text],
images=image_inputs,
videos=video_inputs,
padding=True,
return_tensors="pt",
)
inputs = inputs.to("cuda")
generated_ids = model.generate(**inputs, max_new_tokens=128)
generated_ids_trimmed = [
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
print(output_text)
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!
The model may have hallucination issues.
Due to limited computational resources, OceanGPT-o currently only supports natural language generation for certain types of sonar images and ocean science images.
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.
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}
}