Text Generation
Transformers
Safetensors
English
olmoe
Mixture of Experts
mixture-of-experts
causal-lm
distributed-training
decentralized-training
sparse-sync
conversational
Instructions to use zjr2000/SPES-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zjr2000/SPES-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zjr2000/SPES-2B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zjr2000/SPES-2B") model = AutoModelForCausalLM.from_pretrained("zjr2000/SPES-2B") 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 zjr2000/SPES-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zjr2000/SPES-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zjr2000/SPES-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zjr2000/SPES-2B
- SGLang
How to use zjr2000/SPES-2B 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 "zjr2000/SPES-2B" \ --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": "zjr2000/SPES-2B", "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 "zjr2000/SPES-2B" \ --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": "zjr2000/SPES-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zjr2000/SPES-2B with Docker Model Runner:
docker model run hf.co/zjr2000/SPES-2B
Update README.md
Browse files
README.md
CHANGED
|
@@ -19,10 +19,6 @@ SPES-2B is a pretrained language model released as part of paper:
|
|
| 19 |
|
| 20 |
**Pretraining A Large Language Model using Distributed GPUs: A Memory-Efficient Decentralized Paradigm**
|
| 21 |
|
| 22 |
-
## Overview
|
| 23 |
-
|
| 24 |
-
SPES-2B is a research checkpoint for studying decentralized and memory-efficient pretraining of Mixture-of-Experts (MoE) language models. The model is trained under the SPES framework, which enables distributed training across GPU nodes with lightweight expert synchronization.
|
| 25 |
-
|
| 26 |
## Model Details
|
| 27 |
|
| 28 |
- **Model name:** SPES-2B
|
|
@@ -44,9 +40,6 @@ This model is intended for:
|
|
| 44 |
- research on MoE training and synchronization
|
| 45 |
- experimentation and evaluation of pretrained language models
|
| 46 |
|
| 47 |
-
## Notes
|
| 48 |
-
|
| 49 |
-
This is a research model. Performance may vary depending on evaluation setup, prompting format, and downstream tasks.
|
| 50 |
|
| 51 |
## Citation
|
| 52 |
|
|
|
|
| 19 |
|
| 20 |
**Pretraining A Large Language Model using Distributed GPUs: A Memory-Efficient Decentralized Paradigm**
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
## Model Details
|
| 23 |
|
| 24 |
- **Model name:** SPES-2B
|
|
|
|
| 40 |
- research on MoE training and synchronization
|
| 41 |
- experimentation and evaluation of pretrained language models
|
| 42 |
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
## Citation
|
| 45 |
|