Instructions to use R136a1/TimeMax-20B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use R136a1/TimeMax-20B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="R136a1/TimeMax-20B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("R136a1/TimeMax-20B") model = AutoModelForCausalLM.from_pretrained("R136a1/TimeMax-20B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use R136a1/TimeMax-20B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "R136a1/TimeMax-20B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "R136a1/TimeMax-20B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/R136a1/TimeMax-20B
- SGLang
How to use R136a1/TimeMax-20B 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 "R136a1/TimeMax-20B" \ --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": "R136a1/TimeMax-20B", "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 "R136a1/TimeMax-20B" \ --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": "R136a1/TimeMax-20B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use R136a1/TimeMax-20B with Docker Model Runner:
docker model run hf.co/R136a1/TimeMax-20B
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# Detail
|
| 7 |
+
|
| 8 |
+
FP16 repo of TimeMAX, A Timecrystal + Mythomax merged to 20B
|
| 9 |
+
|
| 10 |
+
# Sauce
|
| 11 |
+
|
| 12 |
+
```yaml
|
| 13 |
+
slices:
|
| 14 |
+
- sources:
|
| 15 |
+
- model: Gryphe/MythoMax-L2-13b
|
| 16 |
+
layer_range: [0, 16]
|
| 17 |
+
- sources:
|
| 18 |
+
- model: BlueNipples/TimeCrystal-l2-13B
|
| 19 |
+
layer_range: [8, 20]
|
| 20 |
+
- sources:
|
| 21 |
+
- model: Gryphe/MythoMax-L2-13b
|
| 22 |
+
layer_range: [17, 32]
|
| 23 |
+
- sources:
|
| 24 |
+
- model: BlueNipples/TimeCrystal-l2-13B
|
| 25 |
+
layer_range: [21, 40]
|
| 26 |
+
merge_method: passthrough
|
| 27 |
+
dtype: float16
|
| 28 |
+
```
|