introvoyz041 commited on
Commit
8755a42
·
verified ·
1 Parent(s): 90819dd

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +45 -0
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: transformers
4
+ pipeline_tag: image-text-to-text
5
+ tags:
6
+ - medical
7
+ - multimodal
8
+ - report generation
9
+ - radiology
10
+ - clinical-reasoning
11
+ - MRI
12
+ - CT
13
+ - Histopathology
14
+ - X-ray
15
+ - Fundus
16
+ - mlx
17
+ - mlx-my-repo
18
+ base_model: lingshu-medical-mllm/Lingshu-7B
19
+ ---
20
+
21
+ # introvoyz041/Lingshu-7B-mlx-fp16
22
+
23
+ The Model [introvoyz041/Lingshu-7B-mlx-fp16](https://huggingface.co/introvoyz041/Lingshu-7B-mlx-fp16) was converted to MLX format from [lingshu-medical-mllm/Lingshu-7B](https://huggingface.co/lingshu-medical-mllm/Lingshu-7B) using mlx-lm version **0.28.3**.
24
+
25
+ ## Use with mlx
26
+
27
+ ```bash
28
+ pip install mlx-lm
29
+ ```
30
+
31
+ ```python
32
+ from mlx_lm import load, generate
33
+
34
+ model, tokenizer = load("introvoyz041/Lingshu-7B-mlx-fp16")
35
+
36
+ prompt="hello"
37
+
38
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
39
+ messages = [{"role": "user", "content": prompt}]
40
+ prompt = tokenizer.apply_chat_template(
41
+ messages, tokenize=False, add_generation_prompt=True
42
+ )
43
+
44
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
45
+ ```