introvoyz041 commited on
Commit
3be2dd2
·
verified ·
1 Parent(s): 1747408

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +40 -0
README.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pipeline_tag: text-generation
4
+ tags:
5
+ - ocean
6
+ - text-generation-inference
7
+ - oceangpt
8
+ - mlx
9
+ - mlx-my-repo
10
+ language:
11
+ - en
12
+ - zh
13
+ base_model: zjunlp/OceanGPT-basic-30B-A3B-Thinking
14
+ ---
15
+
16
+ # introvoyz041/OceanGPT-basic-30B-A3B-Thinking-mlx-4Bit
17
+
18
+ The Model [introvoyz041/OceanGPT-basic-30B-A3B-Thinking-mlx-4Bit](https://huggingface.co/introvoyz041/OceanGPT-basic-30B-A3B-Thinking-mlx-4Bit) was converted to MLX format from [zjunlp/OceanGPT-basic-30B-A3B-Thinking](https://huggingface.co/zjunlp/OceanGPT-basic-30B-A3B-Thinking) using mlx-lm version **0.28.3**.
19
+
20
+ ## Use with mlx
21
+
22
+ ```bash
23
+ pip install mlx-lm
24
+ ```
25
+
26
+ ```python
27
+ from mlx_lm import load, generate
28
+
29
+ model, tokenizer = load("introvoyz041/OceanGPT-basic-30B-A3B-Thinking-mlx-4Bit")
30
+
31
+ prompt="hello"
32
+
33
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
34
+ messages = [{"role": "user", "content": prompt}]
35
+ prompt = tokenizer.apply_chat_template(
36
+ messages, tokenize=False, add_generation_prompt=True
37
+ )
38
+
39
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
40
+ ```