ariG23498 HF Staff commited on
Commit
6f24eb1
·
verified ·
1 Parent(s): 3f1ba89

Upload MiniMaxAI_MiniMax-M2_0.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. MiniMaxAI_MiniMax-M2_0.py +7 -2
MiniMaxAI_MiniMax-M2_0.py CHANGED
@@ -1,9 +1,14 @@
1
  # /// script
2
  # requires-python = ">=3.12"
3
  # dependencies = [
 
 
 
 
4
  # "torch",
5
  # "torchvision",
6
  # "transformers",
 
7
  # "diffusers",
8
  # "sentence-transformers",
9
  # "accelerate",
@@ -16,7 +21,7 @@ try:
16
  # Use a pipeline as a high-level helper
17
  from transformers import pipeline
18
 
19
- pipe = pipeline("text-generation", model="MiniMaxAI/MiniMax-M2")
20
  messages = [
21
  {"role": "user", "content": "Who are you?"},
22
  ]
@@ -38,7 +43,7 @@ except Exception as e:
38
  # Use a pipeline as a high-level helper
39
  from transformers import pipeline
40
 
41
- pipe = pipeline("text-generation", model="MiniMaxAI/MiniMax-M2")
42
  messages = [
43
  {"role": "user", "content": "Who are you?"},
44
  ]
 
1
  # /// script
2
  # requires-python = ">=3.12"
3
  # dependencies = [
4
+ # "numpy",
5
+ # "einops",
6
+ # "pandas",
7
+ # "protobuf",
8
  # "torch",
9
  # "torchvision",
10
  # "transformers",
11
+ # "timm",
12
  # "diffusers",
13
  # "sentence-transformers",
14
  # "accelerate",
 
21
  # Use a pipeline as a high-level helper
22
  from transformers import pipeline
23
 
24
+ pipe = pipeline("text-generation", model="MiniMaxAI/MiniMax-M2", trust_remote_code=True)
25
  messages = [
26
  {"role": "user", "content": "Who are you?"},
27
  ]
 
43
  # Use a pipeline as a high-level helper
44
  from transformers import pipeline
45
 
46
+ pipe = pipeline("text-generation", model="MiniMaxAI/MiniMax-M2", trust_remote_code=True)
47
  messages = [
48
  {"role": "user", "content": "Who are you?"},
49
  ]