Text Generation
Transformers
Safetensors
qwen4_exp_text
qwen4-exp
mixture-of-experts
language-model
pretrained
pt
sft
conversational
Instructions to use Modujo-AI/ModujoMoE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Modujo-AI/ModujoMoE with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Modujo-AI/ModujoMoE") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Modujo-AI/ModujoMoE") model = AutoModelForCausalLM.from_pretrained("Modujo-AI/ModujoMoE", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Modujo-AI/ModujoMoE with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Modujo-AI/ModujoMoE" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Modujo-AI/ModujoMoE", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Modujo-AI/ModujoMoE
- SGLang
How to use Modujo-AI/ModujoMoE with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Modujo-AI/ModujoMoE" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Modujo-AI/ModujoMoE", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Modujo-AI/ModujoMoE" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Modujo-AI/ModujoMoE", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Modujo-AI/ModujoMoE with Docker Model Runner:
docker model run hf.co/Modujo-AI/ModujoMoE
Index separate Modujo 4B PT and SFT releases
Browse files
README.md
CHANGED
|
@@ -6,6 +6,8 @@ tags:
|
|
| 6 |
- mixture-of-experts
|
| 7 |
- language-model
|
| 8 |
- pretrained
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
# Modujo model weights
|
|
@@ -19,11 +21,11 @@ longer contains model weights and must not be loaded directly.
|
|
| 19 |
| Path | Model | Meaning | Status |
|
| 20 |
| --- | --- | --- | --- |
|
| 21 |
| [`pretrain/Modujo-1B-A0.75B/`](./pretrain/Modujo-1B-A0.75B) | Modujo-1B-A0.75B | Continued-pretraining base model: 1B total scale and A0.75B active scale | Available |
|
|
|
|
|
|
|
| 22 |
| Repository root | Historical 9B-A1B architecture metadata and shared tokenizer files | The original random-initialized 9B weight shards were removed; this is not a loadable model directory | No weights |
|
| 23 |
|
| 24 |
-
|
| 25 |
-
repository. New variants should be published in their own named directories so
|
| 26 |
-
their training stage and actual parameter size remain explicit.
|
| 27 |
|
| 28 |
## Pretrained base model
|
| 29 |
|
|
@@ -51,7 +53,7 @@ Pass the subdirectory explicitly:
|
|
| 51 |
import torch
|
| 52 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 53 |
|
| 54 |
-
repo_id = "
|
| 55 |
subfolder = "pretrain/Modujo-1B-A0.75B"
|
| 56 |
|
| 57 |
tokenizer = AutoTokenizer.from_pretrained(repo_id, subfolder=subfolder)
|
|
@@ -63,7 +65,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 63 |
)
|
| 64 |
```
|
| 65 |
|
| 66 |
-
Loading only `
|
| 67 |
there are intentionally no weights at the repository root.
|
| 68 |
|
| 69 |
## Planned experiments
|
|
|
|
| 6 |
- mixture-of-experts
|
| 7 |
- language-model
|
| 8 |
- pretrained
|
| 9 |
+
- pt
|
| 10 |
+
- sft
|
| 11 |
---
|
| 12 |
|
| 13 |
# Modujo model weights
|
|
|
|
| 21 |
| Path | Model | Meaning | Status |
|
| 22 |
| --- | --- | --- | --- |
|
| 23 |
| [`pretrain/Modujo-1B-A0.75B/`](./pretrain/Modujo-1B-A0.75B) | Modujo-1B-A0.75B | Continued-pretraining base model: 1B total scale and A0.75B active scale | Available |
|
| 24 |
+
| [`sft/Modujo-4B-A0.66B/`](./sft/Modujo-4B-A0.66B) | Modujo-4B-A0.66B SFT | Intermediate short-data SFT checkpoint; teacher stage not started | Experimental |
|
| 25 |
+
| [`pt/Modujo-4B-A0.66B/`](./pt/Modujo-4B-A0.66B) | Modujo-4B-A0.66B PT | Intermediate continued-pretraining snapshot; not instruction-tuned | Available |
|
| 26 |
| Repository root | Historical 9B-A1B architecture metadata and shared tokenizer files | The original random-initialized 9B weight shards were removed; this is not a loadable model directory | No weights |
|
| 27 |
|
| 28 |
+
Separate 4B PT and experimental SFT snapshots are available in named directories. The SFT has not completed its teacher-distillation stage. The PT is a later continuation snapshot than the SFT initialization source; see each model card for lineage and limitations.
|
|
|
|
|
|
|
| 29 |
|
| 30 |
## Pretrained base model
|
| 31 |
|
|
|
|
| 53 |
import torch
|
| 54 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 55 |
|
| 56 |
+
repo_id = "Modujo-AI/ModujoMoE"
|
| 57 |
subfolder = "pretrain/Modujo-1B-A0.75B"
|
| 58 |
|
| 59 |
tokenizer = AutoTokenizer.from_pretrained(repo_id, subfolder=subfolder)
|
|
|
|
| 65 |
)
|
| 66 |
```
|
| 67 |
|
| 68 |
+
Loading only `Modujo-AI/ModujoMoE` without `subfolder` will fail because
|
| 69 |
there are intentionally no weights at the repository root.
|
| 70 |
|
| 71 |
## Planned experiments
|