Any-to-Any
Transformers
Safetensors
English
Māori
abteex-ai-labs
aotearoa
gemma
legacy
lumynax
sovereign-ai
outdated
Instructions to use AbteeXAILab/lumynax-infused-gemma-e4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AbteeXAILab/lumynax-infused-gemma-e4b with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AbteeXAILab/lumynax-infused-gemma-e4b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Remove explicit LumynaX system prompt from hf_space app
Browse files- hf_space/app.py +17 -22
hf_space/app.py
CHANGED
|
@@ -10,14 +10,13 @@ import torch
|
|
| 10 |
from huggingface_hub import snapshot_download
|
| 11 |
from transformers import AutoModelForMultimodalLM, AutoProcessor
|
| 12 |
|
| 13 |
-
MODEL_TITLE = "LumynaX Infused Gemma E4B Model"
|
| 14 |
-
DEFAULT_MODEL_REPO_ID = "AbteeXAILab/lumynax-infused-gemma-e4b"
|
| 15 |
-
MODEL_REPO_ENV_VAR = "LUMYNAX_MODEL_REPO_ID"
|
| 16 |
-
HF_TOKEN_ENV_VARS = ("HF_TOKEN", "HUGGING_FACE_HUB_TOKEN", "HUGGINGFACE_HUB_TOKEN")
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
GPU_REQUIRED_MESSAGE = (
|
| 21 |
"This demo package needs GPU-backed Hugging Face Space hardware for live inference. "
|
| 22 |
"The current runtime is CPU-only, which is too slow for the Gemma E4B multimodal checkpoint. "
|
| 23 |
"Switch the Space hardware to T4 or better."
|
|
@@ -124,20 +123,16 @@ def run_request(
|
|
| 124 |
content: list[dict[str, str]] = []
|
| 125 |
if image_ref:
|
| 126 |
content.append({"type": "image", "url": image_ref})
|
| 127 |
-
if audio_ref:
|
| 128 |
-
content.append({"type": "audio", "audio": audio_ref})
|
| 129 |
-
content.append({"type": "text", "text": prompt.strip()})
|
| 130 |
-
|
| 131 |
-
messages = [
|
| 132 |
-
{
|
| 133 |
-
"role": "
|
| 134 |
-
"content":
|
| 135 |
-
},
|
| 136 |
-
|
| 137 |
-
"role": "user",
|
| 138 |
-
"content": content,
|
| 139 |
-
},
|
| 140 |
-
]
|
| 141 |
|
| 142 |
model, processor = _load_runtime()
|
| 143 |
inputs = processor.apply_chat_template(
|
|
|
|
| 10 |
from huggingface_hub import snapshot_download
|
| 11 |
from transformers import AutoModelForMultimodalLM, AutoProcessor
|
| 12 |
|
| 13 |
+
MODEL_TITLE = "LumynaX Infused Gemma E4B Model"
|
| 14 |
+
DEFAULT_MODEL_REPO_ID = "AbteeXAILab/lumynax-infused-gemma-e4b"
|
| 15 |
+
MODEL_REPO_ENV_VAR = "LUMYNAX_MODEL_REPO_ID"
|
| 16 |
+
HF_TOKEN_ENV_VARS = ("HF_TOKEN", "HUGGING_FACE_HUB_TOKEN", "HUGGINGFACE_HUB_TOKEN")
|
| 17 |
+
DEFAULT_IMAGE_URL = "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/GoldenGate.png"
|
| 18 |
+
DEFAULT_AUDIO_URL = "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/journal1.wav"
|
| 19 |
+
GPU_REQUIRED_MESSAGE = (
|
|
|
|
| 20 |
"This demo package needs GPU-backed Hugging Face Space hardware for live inference. "
|
| 21 |
"The current runtime is CPU-only, which is too slow for the Gemma E4B multimodal checkpoint. "
|
| 22 |
"Switch the Space hardware to T4 or better."
|
|
|
|
| 123 |
content: list[dict[str, str]] = []
|
| 124 |
if image_ref:
|
| 125 |
content.append({"type": "image", "url": image_ref})
|
| 126 |
+
if audio_ref:
|
| 127 |
+
content.append({"type": "audio", "audio": audio_ref})
|
| 128 |
+
content.append({"type": "text", "text": prompt.strip()})
|
| 129 |
+
|
| 130 |
+
messages = [
|
| 131 |
+
{
|
| 132 |
+
"role": "user",
|
| 133 |
+
"content": content,
|
| 134 |
+
},
|
| 135 |
+
]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
|
| 137 |
model, processor = _load_runtime()
|
| 138 |
inputs = processor.apply_chat_template(
|