Text Generation
Transformers
Safetensors
mixtral
Mixture of Experts
frankenmoe
Merge
mergekit
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use moeru-ai/L3.1-Moe-4x8B-v0.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moeru-ai/L3.1-Moe-4x8B-v0.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="moeru-ai/L3.1-Moe-4x8B-v0.2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("moeru-ai/L3.1-Moe-4x8B-v0.2") model = AutoModelForMultimodalLM.from_pretrained("moeru-ai/L3.1-Moe-4x8B-v0.2") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use moeru-ai/L3.1-Moe-4x8B-v0.2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "moeru-ai/L3.1-Moe-4x8B-v0.2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moeru-ai/L3.1-Moe-4x8B-v0.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/moeru-ai/L3.1-Moe-4x8B-v0.2
- SGLang
How to use moeru-ai/L3.1-Moe-4x8B-v0.2 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 "moeru-ai/L3.1-Moe-4x8B-v0.2" \ --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": "moeru-ai/L3.1-Moe-4x8B-v0.2", "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 "moeru-ai/L3.1-Moe-4x8B-v0.2" \ --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": "moeru-ai/L3.1-Moe-4x8B-v0.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use moeru-ai/L3.1-Moe-4x8B-v0.2 with Docker Model Runner:
docker model run hf.co/moeru-ai/L3.1-Moe-4x8B-v0.2
| license: llama3.1 | |
| library_name: transformers | |
| tags: | |
| - moe | |
| - frankenmoe | |
| - merge | |
| - mergekit | |
| base_model: | |
| - Joseph717171/Llama-3.1-SuperNova-8B-Lite_TIES_with_Base | |
| - ArliAI/Llama-3.1-8B-ArliAI-RPMax-v1.2 | |
| - rombodawg/rombos_Replete-Coder-Instruct-8b-Merged | |
| - 3rd-Degree-Burn/Llama-3.1-8B-Squareroot-v0 | |
| model-index: | |
| - name: L3.1-Moe-4x8B-v0.2 | |
| results: | |
| - task: | |
| type: text-generation | |
| name: Text Generation | |
| dataset: | |
| name: IFEval (0-Shot) | |
| type: HuggingFaceH4/ifeval | |
| args: | |
| num_few_shot: 0 | |
| metrics: | |
| - type: inst_level_strict_acc and prompt_level_strict_acc | |
| value: 54.07 | |
| name: strict accuracy | |
| source: | |
| url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=moeru-ai/L3.1-Moe-4x8B-v0.2 | |
| name: Open LLM Leaderboard | |
| - task: | |
| type: text-generation | |
| name: Text Generation | |
| dataset: | |
| name: BBH (3-Shot) | |
| type: BBH | |
| args: | |
| num_few_shot: 3 | |
| metrics: | |
| - type: acc_norm | |
| value: 21.34 | |
| name: normalized accuracy | |
| source: | |
| url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=moeru-ai/L3.1-Moe-4x8B-v0.2 | |
| name: Open LLM Leaderboard | |
| - task: | |
| type: text-generation | |
| name: Text Generation | |
| dataset: | |
| name: MATH Lvl 5 (4-Shot) | |
| type: hendrycks/competition_math | |
| args: | |
| num_few_shot: 4 | |
| metrics: | |
| - type: exact_match | |
| value: 5.29 | |
| name: exact match | |
| source: | |
| url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=moeru-ai/L3.1-Moe-4x8B-v0.2 | |
| name: Open LLM Leaderboard | |
| - task: | |
| type: text-generation | |
| name: Text Generation | |
| dataset: | |
| name: GPQA (0-shot) | |
| type: Idavidrein/gpqa | |
| args: | |
| num_few_shot: 0 | |
| metrics: | |
| - type: acc_norm | |
| value: 2.24 | |
| name: acc_norm | |
| source: | |
| url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=moeru-ai/L3.1-Moe-4x8B-v0.2 | |
| name: Open LLM Leaderboard | |
| - task: | |
| type: text-generation | |
| name: Text Generation | |
| dataset: | |
| name: MuSR (0-shot) | |
| type: TAUR-Lab/MuSR | |
| args: | |
| num_few_shot: 0 | |
| metrics: | |
| - type: acc_norm | |
| value: 2.29 | |
| name: acc_norm | |
| source: | |
| url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=moeru-ai/L3.1-Moe-4x8B-v0.2 | |
| name: Open LLM Leaderboard | |
| - task: | |
| type: text-generation | |
| name: Text Generation | |
| dataset: | |
| name: MMLU-PRO (5-shot) | |
| type: TIGER-Lab/MMLU-Pro | |
| config: main | |
| split: test | |
| args: | |
| num_few_shot: 5 | |
| metrics: | |
| - type: acc | |
| value: 19.58 | |
| name: accuracy | |
| source: | |
| url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=moeru-ai/L3.1-Moe-4x8B-v0.2 | |
| name: Open LLM Leaderboard | |
| # L3.1-Moe-4x8B-v0.2 | |
|  | |
| This model is a Mixture of Experts (MoE) made with mergekit-moe. It uses the following base models: | |
| - [Joseph717171/Llama-3.1-SuperNova-8B-Lite_TIES_with_Base](https://huggingface.co/Joseph717171/Llama-3.1-SuperNova-8B-Lite_TIES_with_Base) | |
| - [ArliAI/Llama-3.1-8B-ArliAI-RPMax-v1.2](https://huggingface.co/ArliAI/Llama-3.1-8B-ArliAI-RPMax-v1.2) | |
| - [rombodawg/rombos_Replete-Coder-Instruct-8b-Merged](https://huggingface.co/rombodawg/rombos_Replete-Coder-Instruct-8b-Merged) | |
| - [3rd-Degree-Burn/Llama-3.1-8B-Squareroot-v0](https://huggingface.co/3rd-Degree-Burn/Llama-3.1-8B-Squareroot-v0) | |
| Heavily inspired by [mlabonne/Beyonder-4x7B-v3](https://huggingface.co/mlabonne/Beyonder-4x7B-v3). | |
| ## Quantized models | |
| ### GGUF by [mradermacher](https://huggingface.co/mradermacher) | |
| - [mradermacher/L3.1-Moe-4x8B-v0.2-i1-GGUF](https://huggingface.co/mradermacher/L3.1-Moe-4x8B-v0.2-i1-GGUF) | |
| - [mradermacher/L3.1-Moe-4x8B-v0.2-GGUF](https://huggingface.co/mradermacher/L3.1-Moe-4x8B-v0.2-GGUF) | |
| ## Mergekit config | |
| ```yaml | |
| base_model: Joseph717171/Llama-3.1-SuperNova-8B-Lite_TIES_with_Base | |
| gate_mode: hidden | |
| dtype: bfloat16 | |
| experts: | |
| - source_model: Joseph717171/Llama-3.1-SuperNova-8B-Lite_TIES_with_Base | |
| positive_prompts: &chat_prompts | |
| - "chat" | |
| - "assistant" | |
| - "tell me" | |
| - "explain" | |
| - "I want" | |
| negative_prompts: &rp_prompts | |
| - "storywriting" | |
| - "write" | |
| - "scene" | |
| - "story" | |
| - "character" | |
| - source_model: ArliAI/Llama-3.1-8B-ArliAI-RPMax-v1.2 | |
| positive_prompts: *rp_prompts | |
| negative_prompts: *chat_prompts | |
| - source_model: rombodawg/rombos_Replete-Coder-Instruct-8b-Merged | |
| positive_prompts: | |
| - "code" | |
| - "python" | |
| - "javascript" | |
| - "programming" | |
| - "algorithm" | |
| - source_model: 3rd-Degree-Burn/Llama-3.1-8B-Squareroot-v0 | |
| positive_prompts: | |
| - "reason" | |
| - "math" | |
| - "mathematics" | |
| - "solve" | |
| - "count" | |
| ``` | |
| # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard) | |
| Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_moeru-ai__L3.1-Moe-4x8B-v0.2) | |
| | Metric |Value| | |
| |-------------------|----:| | |
| |Avg. |17.47| | |
| |IFEval (0-Shot) |54.07| | |
| |BBH (3-Shot) |21.34| | |
| |MATH Lvl 5 (4-Shot)| 5.29| | |
| |GPQA (0-shot) | 2.24| | |
| |MuSR (0-shot) | 2.29| | |
| |MMLU-PRO (5-shot) |19.58| | |