miike-ai commited on
Commit
65a4b42
·
verified ·
1 Parent(s): 6fc6088

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -38
README.md CHANGED
@@ -1,38 +1,24 @@
1
- ---
2
- base_model:
3
- - deepseek-ai/DeepSeek-R1-Distill-Llama-8B
4
- library_name: transformers
5
- tags:
6
- - mergekit
7
- - merge
8
-
9
- ---
10
- # models
11
-
12
- This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
13
-
14
- ## Merge Details
15
- ### Merge Method
16
-
17
- This model was merged using the Passthrough merge method.
18
-
19
- ### Models Merged
20
-
21
- The following models were included in the merge:
22
- * [deepseek-ai/DeepSeek-R1-Distill-Llama-8B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-8B)
23
-
24
- ### Configuration
25
-
26
- The following YAML configuration was used to produce this model:
27
-
28
- ```yaml
29
- slices:
30
- - sources:
31
- - model: deepseek-ai/DeepSeek-R1-Distill-Llama-8B
32
- layer_range: [0, 24]
33
- - sources:
34
- - model: deepseek-ai/DeepSeek-R1-Distill-Llama-8B
35
- layer_range: [8, 32]
36
- merge_method: passthrough
37
- dtype: bfloat16
38
- ```
 
1
+ ```python
2
+ import transformers
3
+ import torch
4
+
5
+ model_id = "miike-ai/r1-12b"
6
+
7
+ pipeline = transformers.pipeline(
8
+ "text-generation",
9
+ model=model_id,
10
+ model_kwargs={"torch_dtype": torch.bfloat16},
11
+ device_map="auto",
12
+ )
13
+
14
+ messages = [
15
+ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
16
+ {"role": "user", "content": "Who are you?"},
17
+ ]
18
+
19
+ outputs = pipeline(
20
+ messages,
21
+ max_new_tokens=8192,
22
+ )
23
+ print(outputs[0]["generated_text"][-1])
24
+ ```