Instructions to use xDAN-AI/APUS-xDAN-4.0-MOE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use xDAN-AI/APUS-xDAN-4.0-MOE with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="xDAN-AI/APUS-xDAN-4.0-MOE", filename="APUS-xDAN4.0-MoE-0402.IQ3_XXS.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use xDAN-AI/APUS-xDAN-4.0-MOE with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS # Run inference directly in the terminal: llama-cli -hf xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS # Run inference directly in the terminal: llama-cli -hf xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS # Run inference directly in the terminal: ./llama-cli -hf xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS # Run inference directly in the terminal: ./build/bin/llama-cli -hf xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS
Use Docker
docker model run hf.co/xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS
- LM Studio
- Jan
- Ollama
How to use xDAN-AI/APUS-xDAN-4.0-MOE with Ollama:
ollama run hf.co/xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS
- Unsloth Studio
How to use xDAN-AI/APUS-xDAN-4.0-MOE with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for xDAN-AI/APUS-xDAN-4.0-MOE to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for xDAN-AI/APUS-xDAN-4.0-MOE to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for xDAN-AI/APUS-xDAN-4.0-MOE to start chatting
- Docker Model Runner
How to use xDAN-AI/APUS-xDAN-4.0-MOE with Docker Model Runner:
docker model run hf.co/xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS
- Lemonade
How to use xDAN-AI/APUS-xDAN-4.0-MOE with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull xDAN-AI/APUS-xDAN-4.0-MOE:IQ3_XXS
Run and chat with the model
lemonade run user.APUS-xDAN-4.0-MOE-IQ3_XXS
List all available models
lemonade list
Introduction
APUS-xDAN-4.0-MOE is a transformer-based decoder-only language model, developed on a vast corpus of data to ensure robust performance.
This is an enhanced MoE (Mixture of Experts) model built on top of the continued pre-training enhanced LlaMA architecture, further optimized with human-enhanced feedback algorithms to improve reasoning, mathematical, and logical capabilities during inference.
For more comprehensive information, please visit our blog post and GitHub repository. https://github.com/shootime2021/APUS-xDAN-4.0-moe
Model Details
APUS-xDAN-4.0-MOE leverages the innovative Mixture of Experts (MoE) architecture, incorporating components from dense language models. Specifically, it inherits its capabilities from the highly performant xDAN-L2 Series. With a total of 136 billion parameters, of which 30 billion are activated during runtime, APUS-xDAN-4.0-MOE demonstrates unparalleled efficiency. Through advanced quantization techniques, our open-source version occupies a mere 42GB, making it seamlessly compatible with consumer-grade GPUs like the 4090 and 3090. The following specifications:
- Parameters: 136B
- Architecture: Mixture of 4 Experts (MoE)
- Experts Utilization: 2 experts used per token
- Layers: 60
- Attention Heads: 56 for queries, 8 for keys/values
- Embedding Size: 7,168
- Additional Features:
- Rotary embeddings (RoPE)
- Supports activation sharding and 1.5bit~4bit quantization
- Maximum Sequence Length (context): 32,768 tokens
Usage
| Model | Quantized | Size | Context | Hardware Requirement |
|---|---|---|---|---|
| APUS-xDAN4.0-MoE-0402.Q2_K.gguf | Q2_K | 39G | 32k | 2x24G GPU memory |
| APUS-xDAN4.0-MoE-0402.IQ3_XXS.gguf | IQ3_XXS | 41G | 32k | 2x24G GPU memory |
| APUS-xDAN4.0-MoE-0402.Q3_K_M_Matrix.gguf | Q3_K_M | 51G | 32k | 2x24G GPU memory |
| APUS-xDAN4.0-MoE-0402.Q4_K_M.gguf | Q4_K_M | 64G | 32k | 3x24G GPU memory |
| APUS-xDAN4.0-MoE-0402 |
Initial
git clone https://github.com/ggerganov/llama.cpp.git
make LLAMA_CUDA=1
Interactive Chat
./main -m APUS-xDAN4.0-MoE-0402.Q2_K.gguf \
--prompt "You are a helpful assistant named APUS-xDAN4.0 MoE." --chatml \
--interactive \
--temp 0.7 \
--ctx-size 4096 (32k)
License
APUS-xDAN-4.0-MOE is distributed under the LLAMA 2 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved.
- Downloads last month
- 35
2-bit
3-bit
