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
|
Download pt/Modujo-4B-A0.66B/README.md from Modujo-AI/ModujoMoE: direct link, hf CLI and curl.
- Browser
- Download file 2.27 kB
-
https://huggingface.co/Modujo-AI/ModujoMoE/resolve/main/pt/Modujo-4B-A0.66B/README.md
- Command line
-
hf download hf://Modujo-AI/ModujoMoE/pt/Modujo-4B-A0.66B/README.md
-
curl -L -o README.md https://huggingface.co/Modujo-AI/ModujoMoE/resolve/main/pt/Modujo-4B-A0.66B/README.md
2.27 kB
| library_name: transformers | |
| pipeline_tag: text-generation | |
| tags: | |
| - pretrained | |
| - pt | |
| - mixture-of-experts | |
| - qwen4-exp | |
| language: | |
| - zh | |
| - en | |
| # Modujo 4B A0.66B — PT | |
| Approximately 3.96B total and 0.66B active parameters. This is an intermediate **continued-pretraining (PT)** snapshot, not an instruction-tuned assistant and not a completed 100B-token run. | |
| ## Architecture and lineage | |
| 28 layers, hidden size 1024, 32 routed experts, top-2,shared expert,tied embeddings. One pass, no trained QSA indexer. Linear-attention and dense-attention layers. Configured maximum positions 32K; current continuation training uses sequences up to 8192. | |
| The snapshot comes from the 4B continuation segment on the pt_100b_ecommerce_20261005 corpus. Snapshot provenance and progress are in release.json. The corpus/run's 100B target is a plan, not a claim of tokens consumed by this snapshot. Tensors are stored FP32; FSDP model shards were merged for this release. Training optimizer/RNG files are not included. | |
| The SFT directory in this repository was initialized from an earlier PT snapshot; it is not fine-tuned from this later PT release. Do not treat PT and SFT as an equal-step controlled comparison. | |
| ## Loading and completion | |
| Download the subdirectory: | |
| ```python | |
| from huggingface_hub import snapshot_download | |
| snapshot_download('Modujo-AI/ModujoMoE', | |
| allow_patterns=['pt/Modujo-4B-A0.66B/*'],local_dir='./modujo-download') | |
| ``` | |
| Run in the compatible environment recorded in tested-environment.json. The environment must provide qwen4_exp; the included compatibility helper disables an absent QSA indexer while preserving causal attention. | |
| ```bash | |
| python modujo-download/pt/Modujo-4B-A0.66B/inference.py --device cuda:0 --raw --prompt '中国的首都是' --max-new-tokens 32 | |
| ``` | |
| Use raw text completion for base-model inspection. The accompanying native chat template is provided for tokenizer compatibility, not as evidence of instruction tuning. Do not load the repository root without selecting a variant. | |
| ## Limits | |
| Pretraining loss does not establish chat, arithmetic, code or tool reliability. This is a research base snapshot; repetition and instruction failures may occur. Source corpus terms remain applicable. No new blanket license is asserted. | |