mattPearce commited on
Commit
9b613d8
·
verified ·
1 Parent(s): 643f495

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +31 -0
README.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ library_name: mlx
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - mlx
7
+ ---
8
+
9
+ # mattPearce/wp-plugin-recommender-mlx
10
+
11
+ ## Use with mlx
12
+
13
+ ```bash
14
+ pip install mlx-lm
15
+ ```
16
+
17
+ ```python
18
+ from mlx_lm import load, generate
19
+
20
+ model, tokenizer = load("mattPearce/wp-plugin-recommender-mlx")
21
+
22
+ prompt = "hello"
23
+
24
+ if tokenizer.chat_template is not None:
25
+ messages = [{"role": "user", "content": prompt}]
26
+ prompt = tokenizer.apply_chat_template(
27
+ messages, add_generation_prompt=True
28
+ )
29
+
30
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
31
+ ```