Instructions to use aixsatoshi/calm2-7b-chat-7b-moe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aixsatoshi/calm2-7b-chat-7b-moe with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aixsatoshi/calm2-7b-chat-7b-moe")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aixsatoshi/calm2-7b-chat-7b-moe") model = AutoModelForCausalLM.from_pretrained("aixsatoshi/calm2-7b-chat-7b-moe", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aixsatoshi/calm2-7b-chat-7b-moe with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aixsatoshi/calm2-7b-chat-7b-moe" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aixsatoshi/calm2-7b-chat-7b-moe", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aixsatoshi/calm2-7b-chat-7b-moe
- SGLang
How to use aixsatoshi/calm2-7b-chat-7b-moe 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 "aixsatoshi/calm2-7b-chat-7b-moe" \ --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": "aixsatoshi/calm2-7b-chat-7b-moe", "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 "aixsatoshi/calm2-7b-chat-7b-moe" \ --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": "aixsatoshi/calm2-7b-chat-7b-moe", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aixsatoshi/calm2-7b-chat-7b-moe with Docker Model Runner:
docker model run hf.co/aixsatoshi/calm2-7b-chat-7b-moe
Model Card for Model ID
This model represents an advanced implementation of a Mixture of Experts (MoE) approach, where cyberagent/calm2-7b serves as the foundational base model, and cyberagent/calm2-7b-chat is incorporated as an chat model. The model is designed to combine the general-purpose language processing capabilities of the calm2-7b with the specialized conversational abilities of the calm2-7b-chat.
Model Details
The model uses the following expert models for generating responses:
Source Model:
cyberagent/calm2-7b-chat- Positive Prompts: ["USER: ", "ASSISTANT: "]
- This source model is utilized to provide responses in a chat-based context, taking both user and assistant inputs into account.
- Positive Prompts: ["USER: ", "ASSISTANT: "]
Source Model:
cyberagent/calm2-7b- Positive Prompts: [""]
- This source model contributes to generating responses without specific chat context, serving as a general-purpose language model.
- Positive Prompts: [""]
Model size: 11.3B
Context length: 32768
Language(s): Japanese, English
Model Sources [optional]
- Repository: https://huggingface.co/cyberagent/calm2-7b
- Repository: https://huggingface.co/cyberagent/calm2-7b-chat
Limitations and Considerations
While this MoE model integrates the strengths of cyberagent/calm2-7b-chat and cyberagent/calm2-7b, it's important to note that it is an experimental model and has not been fine-tuned post-composition. As such, users are advised to perform their own tuning and optimization to adapt the model to their specific use cases and requirements.
- Downloads last month
- 5