Instructions to use yuuko-eth/Rain-2x7B-MoE-32k-v0.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yuuko-eth/Rain-2x7B-MoE-32k-v0.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yuuko-eth/Rain-2x7B-MoE-32k-v0.2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yuuko-eth/Rain-2x7B-MoE-32k-v0.2") model = AutoModelForCausalLM.from_pretrained("yuuko-eth/Rain-2x7B-MoE-32k-v0.2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yuuko-eth/Rain-2x7B-MoE-32k-v0.2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yuuko-eth/Rain-2x7B-MoE-32k-v0.2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuuko-eth/Rain-2x7B-MoE-32k-v0.2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yuuko-eth/Rain-2x7B-MoE-32k-v0.2
- SGLang
How to use yuuko-eth/Rain-2x7B-MoE-32k-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 "yuuko-eth/Rain-2x7B-MoE-32k-v0.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuuko-eth/Rain-2x7B-MoE-32k-v0.2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "yuuko-eth/Rain-2x7B-MoE-32k-v0.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuuko-eth/Rain-2x7B-MoE-32k-v0.2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yuuko-eth/Rain-2x7B-MoE-32k-v0.2 with Docker Model Runner:
docker model run hf.co/yuuko-eth/Rain-2x7B-MoE-32k-v0.2
小雨同學 2x7B
採用聯發科 Breeze 7B Instruct 為基底的國語 MoE (Mixture-of-Experts) 模型,共有兩個 Expert model。
請用 Marcoro14-7B 或是 Breeze-7B-Instruct 所推薦的 Prompt 格式進行操作;以下為模型配置。
- v0.2 更新了 tokenizer parameters
Rain-2x7B-MoE-32k-v0.2
This is an experimental Mixtral-architecture MoE model with 2 of 7B sized fine-tunes. Breeze and CodeNinja are used on top of Marcoro14-7B-slerp.
Model configuration is as follows:
- Marcoro14-7B-slerp as base.
- Breeze-7B-Instruct-v0_1 as model 0.
- CodeNinja-1.0-OpenChat-7B as model 1.
To use the model, please use either prompt templates suggested by the base models.
Notes
Please evaluate before use in any application pipeline. Activation for coding part of the model would be 'code', 'python', 'typescript', 'javascript', 'programming', 'algorithm'.
- Downloads last month
- 27
