candaon777 commited on
Commit
77f9305
·
verified ·
1 Parent(s): 0403553

Add files using upload-large-folder tool

Browse files
Files changed (1) hide show
  1. README.md +35 -0
README.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: text-generation
4
+ library_name: transformers
5
+ tags:
6
+ - vllm
7
+ ---
8
+
9
+ # mlx-community/gpt-oss-120b-4bit
10
+
11
+ This model [mlx-community/gpt-oss-120b-4bit](https://huggingface.co/mlx-community/gpt-oss-120b-4bit) was
12
+ converted to MLX format from [None](https://huggingface.co/None)
13
+ using mlx-lm version **0.26.3**.
14
+
15
+ ## Use with mlx
16
+
17
+ ```bash
18
+ pip install mlx-lm
19
+ ```
20
+
21
+ ```python
22
+ from mlx_lm import load, generate
23
+
24
+ model, tokenizer = load("mlx-community/gpt-oss-120b-4bit")
25
+
26
+ prompt = "hello"
27
+
28
+ if tokenizer.chat_template is not None:
29
+ messages = [{"role": "user", "content": prompt}]
30
+ prompt = tokenizer.apply_chat_template(
31
+ messages, add_generation_prompt=True
32
+ )
33
+
34
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
35
+ ```