Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| OceanGPT-2B-v0.1.Q2_K.gguf | Q2_K | 1.12GB |
| OceanGPT-2B-v0.1.IQ3_XS.gguf | IQ3_XS | 1.21GB |
| OceanGPT-2B-v0.1.IQ3_S.gguf | IQ3_S | 1.26GB |
| OceanGPT-2B-v0.1.Q3_K_S.gguf | Q3_K_S | 1.26GB |
| OceanGPT-2B-v0.1.IQ3_M.gguf | IQ3_M | 1.32GB |
| OceanGPT-2B-v0.1.Q3_K.gguf | Q3_K | 1.38GB |
| OceanGPT-2B-v0.1.Q3_K_M.gguf | Q3_K_M | 1.38GB |
| OceanGPT-2B-v0.1.Q3_K_L.gguf | Q3_K_L | 1.46GB |
| OceanGPT-2B-v0.1.IQ4_XS.gguf | IQ4_XS | 1.45GB |
| OceanGPT-2B-v0.1.Q4_0.gguf | Q4_0 | 1.5GB |
| OceanGPT-2B-v0.1.IQ4_NL.gguf | IQ4_NL | 1.51GB |
| OceanGPT-2B-v0.1.Q4_K_S.gguf | Q4_K_S | 1.57GB |
| OceanGPT-2B-v0.1.Q4_K.gguf | Q4_K | 1.68GB |
| OceanGPT-2B-v0.1.Q4_K_M.gguf | Q4_K_M | 1.68GB |
| OceanGPT-2B-v0.1.Q4_1.gguf | Q4_1 | 1.64GB |
| OceanGPT-2B-v0.1.Q5_0.gguf | Q5_0 | 1.78GB |
| OceanGPT-2B-v0.1.Q5_K_S.gguf | Q5_K_S | 1.81GB |
| OceanGPT-2B-v0.1.Q5_K.gguf | Q5_K | 1.9GB |
| OceanGPT-2B-v0.1.Q5_K_M.gguf | Q5_K_M | 1.9GB |
| OceanGPT-2B-v0.1.Q5_1.gguf | Q5_1 | 1.93GB |
| OceanGPT-2B-v0.1.Q6_K.gguf | Q6_K | 2.2GB |
| OceanGPT-2B-v0.1.Q8_0.gguf | Q8_0 | 2.7GB |

1git lfs install
2git clone https://huggingface.co/zjunlp/OceanGPT-2B-v0.1huggingface-cli download --resume-download zjunlp/OceanGPT-2B-v0.1 --local-dir OceanGPT-2B-v0.1 --local-dir-use-symlinks False1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3device = "cuda" # the device to load the model onto
4path = 'YOUR-MODEL-PATH'
5model = AutoModelForCausalLM.from_pretrained(
6 path,
7 torch_dtype=torch.bfloat16,
8 device_map="auto"
9)
10tokenizer = AutoTokenizer.from_pretrained(path)
11
12prompt = "Which is the largest ocean in the world?"
13messages = [
14 {"role": "system", "content": "You are a helpful assistant."},
15 {"role": "user", "content": prompt}
16]
17text = tokenizer.apply_chat_template(
18 messages,
19 tokenize=False,
20 add_generation_prompt=True
21)
22model_inputs = tokenizer([text], return_tensors="pt").to(device)
23
24generated_ids = model.generate(
25 model_inputs.input_ids,
26 max_new_tokens=512
27)
28generated_ids = [
29 output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
30]
31
32response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]| Model Name | HuggingFace | WiseModel | ModelScope |
|---|---|---|---|
| OceanGPT-14B-v0.1 (based on Qwen) | 14B | 14B | 14B |
| OceanGPT-7B-v0.2 (based on Qwen) | 7B | 7B | 7B |
| OceanGPT-2B-v0.1 (based on MiniCPM) | 2B | 2B | 2B |
1@article{bi2023oceangpt,
2 title={OceanGPT: A Large Language Model for Ocean Science Tasks},
3 author={Bi, Zhen and Zhang, Ningyu and Xue, Yida and Ou, Yixin and Ji, Daxiong and Zheng, Guozhou and Chen, Huajun},
4 journal={arXiv preprint arXiv:2310.02031},
5 year={2023}
6}
7