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 sft/Modujo-4B-A0.66B/README.md from Modujo-AI/ModujoMoE: direct link, hf CLI and curl.
- Browser
- Download file 2.67 kB
-
https://huggingface.co/Modujo-AI/ModujoMoE/resolve/main/sft/Modujo-4B-A0.66B/README.md
- Command line
-
hf download hf://Modujo-AI/ModujoMoE/sft/Modujo-4B-A0.66B/README.md
-
curl -L -o README.md https://huggingface.co/Modujo-AI/ModujoMoE/resolve/main/sft/Modujo-4B-A0.66B/README.md
2.67 kB
| library_name: transformers | |
| pipeline_tag: text-generation | |
| tags: | |
| - mixture-of-experts | |
| - qwen4-exp | |
| - sft | |
| - experimental | |
| language: | |
| - zh | |
| - en | |
| # Modujo 4B A0.66B — SFT | |
| Experimental intermediate SFT checkpoint with approximately 3.96B total and 0.66B active parameters. This is a short-data-stage snapshot, not a completed teacher-distillation or production assistant release. | |
| ## Architecture and training | |
| - Qwen4ExpForCausalLM, 28 layers, hidden size1024, 32 routed experts, top2, tied embeddings; one pass, no trained QSA indexer. | |
| - Source PT: checkpoint17500 of the 4B pretraining run. | |
| - Swift full SFT, FP32 master weights/AdamW states and BF16 compute; 8 B200 GPUs, global example batch128. | |
| - Snapshot: short stage step36000/40017, about89.96% of its single epoch. | |
| - Short stage: 5,122,171 cleaned rows, mostly MiniMind (5,040,686); e-commerce39,975, OpenGPT31,511, Claude9,999. Native training context<=2048, retained low reasoning<=512, predominantly no-think. | |
| - Qwen/GLM/DeepSeek community teacher data and original long rows are scheduled in a later stage and have not been trained into this snapshot. | |
| - Saved tensors remain FP32; optimizer and RNG states are not included in this inference release. | |
| ## Loading | |
| The repository root is not a loadable model. Use this subdirectory. The installed Transformers environment used for validation is documented in tested-environment.json; it must provide the qwen4_exp architecture. Null-indexer checkpoints require the included dense-attention compatibility helper. | |
| Download this directory: | |
| ```python | |
| from huggingface_hub import snapshot_download | |
| snapshot_download('Modujo-AI/ModujoMoE', | |
| allow_patterns=['sft/Modujo-4B-A0.66B/*'], | |
| local_dir='./modujo-download') | |
| ``` | |
| Run the included inference script in the recorded compatible environment: | |
| ```bash | |
| python modujo-download/sft/Modujo-4B-A0.66B/inference.py --device cuda:0 | |
| # CPU fallback is also supported: --device cpu | |
| ``` | |
| ## Observed quality and limitations | |
| These are diagnostic cases, not benchmark accuracy estimates. Elementary arithmetic, event relations, strict JSON and low-think correctness remain unreliable. The palindrome function passes four basic tests but fails a punctuation boundary test by ignoring more characters than requested. Low-think multiplication repeats to512 tokens; apple reasoning closes but reaches an incorrect answer. English capital question returns Paris. Full inputs and generations are in evaluation/. | |
| This snapshot is suitable for research and inspection; it should not be represented as a reliable assistant. Source datasets' applicable terms remain relevant; no new blanket license is asserted by this card. | |