Upload 6 files
Browse files
custom_code/GSAI-ML_LLaDA-8B-Instruct.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# /// script
|
| 3 |
+
# requires-python = ">=3.12"
|
| 4 |
+
# dependencies = [
|
| 5 |
+
# "transformers",
|
| 6 |
+
# "torch",
|
| 7 |
+
# ]
|
| 8 |
+
# ///
|
| 9 |
+
# Use a pipeline as a high-level helper
|
| 10 |
+
from transformers import pipeline
|
| 11 |
+
|
| 12 |
+
pipe = pipeline("text-generation", model="GSAI-ML/LLaDA-8B-Instruct", trust_remote_code=True)
|
| 13 |
+
messages = [
|
| 14 |
+
{"role": "user", "content": "Who are you?"},
|
| 15 |
+
]
|
| 16 |
+
pipe(messages)
|
| 17 |
+
# Load model directly
|
| 18 |
+
from transformers import AutoModelForCausalLM
|
| 19 |
+
model = AutoModelForCausalLM.from_pretrained("GSAI-ML/LLaDA-8B-Instruct", trust_remote_code=True)
|
custom_code/Gen-Verse_MMaDA-8B-Base.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# /// script
|
| 3 |
+
# requires-python = ">=3.12"
|
| 4 |
+
# dependencies = [
|
| 5 |
+
# "transformers",
|
| 6 |
+
# "torch",
|
| 7 |
+
# ]
|
| 8 |
+
# ///
|
| 9 |
+
# Load model directly
|
| 10 |
+
from transformers import AutoModel
|
| 11 |
+
model = AutoModel.from_pretrained("Gen-Verse/MMaDA-8B-Base", trust_remote_code=True)
|
custom_code/deepseek-ai_DeepSeek-R1.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# /// script
|
| 3 |
+
# requires-python = ">=3.12"
|
| 4 |
+
# dependencies = [
|
| 5 |
+
# "transformers",
|
| 6 |
+
# "torch",
|
| 7 |
+
# ]
|
| 8 |
+
# ///
|
| 9 |
+
# Use a pipeline as a high-level helper
|
| 10 |
+
from transformers import pipeline
|
| 11 |
+
|
| 12 |
+
pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1", trust_remote_code=True)
|
| 13 |
+
messages = [
|
| 14 |
+
{"role": "user", "content": "Who are you?"},
|
| 15 |
+
]
|
| 16 |
+
pipe(messages)
|
| 17 |
+
# Load model directly
|
| 18 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 19 |
+
|
| 20 |
+
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-R1", trust_remote_code=True)
|
| 21 |
+
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-R1", trust_remote_code=True)
|
custom_code/deepseek-ai_DeepSeek-V3-0324.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# /// script
|
| 3 |
+
# requires-python = ">=3.12"
|
| 4 |
+
# dependencies = [
|
| 5 |
+
# "transformers",
|
| 6 |
+
# "torch",
|
| 7 |
+
# ]
|
| 8 |
+
# ///
|
| 9 |
+
# Use a pipeline as a high-level helper
|
| 10 |
+
from transformers import pipeline
|
| 11 |
+
|
| 12 |
+
pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-V3-0324", trust_remote_code=True)
|
| 13 |
+
messages = [
|
| 14 |
+
{"role": "user", "content": "Who are you?"},
|
| 15 |
+
]
|
| 16 |
+
pipe(messages)
|
| 17 |
+
# Load model directly
|
| 18 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 19 |
+
|
| 20 |
+
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-V3-0324", trust_remote_code=True)
|
| 21 |
+
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-V3-0324", trust_remote_code=True)
|
custom_code/jinaai_jina-embeddings-v3.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# /// script
|
| 3 |
+
# requires-python = ">=3.12"
|
| 4 |
+
# dependencies = [
|
| 5 |
+
# "transformers",
|
| 6 |
+
# "torch",
|
| 7 |
+
# ]
|
| 8 |
+
# ///
|
| 9 |
+
# Use a pipeline as a high-level helper
|
| 10 |
+
from transformers import pipeline
|
| 11 |
+
|
| 12 |
+
pipe = pipeline("feature-extraction", model="jinaai/jina-embeddings-v3", trust_remote_code=True)
|
| 13 |
+
# Load model directly
|
| 14 |
+
from transformers import AutoModel
|
| 15 |
+
model = AutoModel.from_pretrained("jinaai/jina-embeddings-v3", trust_remote_code=True)
|
custom_code/pfnet_plamo-2-translate.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# /// script
|
| 3 |
+
# requires-python = ">=3.12"
|
| 4 |
+
# dependencies = [
|
| 5 |
+
# "transformers",
|
| 6 |
+
# "torch",
|
| 7 |
+
# ]
|
| 8 |
+
# ///
|
| 9 |
+
# Use a pipeline as a high-level helper
|
| 10 |
+
from transformers import pipeline
|
| 11 |
+
|
| 12 |
+
pipe = pipeline("text-generation", model="pfnet/plamo-2-translate", trust_remote_code=True)
|
| 13 |
+
messages = [
|
| 14 |
+
{"role": "user", "content": "Who are you?"},
|
| 15 |
+
]
|
| 16 |
+
pipe(messages)
|
| 17 |
+
# Load model directly
|
| 18 |
+
from transformers import AutoModelForCausalLM
|
| 19 |
+
model = AutoModelForCausalLM.from_pretrained("pfnet/plamo-2-translate", trust_remote_code=True)
|