Views
No views yet
| Model | Support Length | 32k | 64k | 128k | 256k | 512k | 1M |
|---|---|---|---|---|---|---|---|
| Llama-3.2-1B-Instruct | 128k | 64.7 | 43.1 | 0.0 | - | - | - |
| Llama-3.2-3B-Instruct | 128k | 77.8 | 70.4 | 0.8 | - | - | - |
| Llama-3.1-8B-Instruct | 128k | 89.8 | 85.4 | 78.5 | - | - | - |
| gradientai/Llama-3-8B-Instruct-Gradient-1048k | 1M | 81.8 | 78.6 | 77.2 | 74.2 | 70.3 | 64.3 |
| SelfLong-1B-1M | 1M | 61.3 | 56.6 | 54.7 | 46.7 | 40.7 | 31.1 |
| SelfLong-3B-1M | 1M | 80.5 | 78.0 | 75.5 | 68.8 | 58.5 | 38.8 |
| SelfLong-8B-1M | 1M | 89.5 | 84.0 | 82.0 | 79.7 | 78.2 | 69.6 |
- indicates that the model does not support the given context length.1PROC_PER_NODE=$(nvidia-smi --list-gpus | wc -l)
2# Reduce this number if you have limited GPU memory
3MAX_MODEL_LEN=1048576
4MODEL_NAME_OR_PATH="self-long/SelfLong-Llama3.1-8B-Instruct-1M"
5
6echo "Starting VLLM server..."
7vllm serve "${MODEL_NAME_OR_PATH}" \
8 --dtype auto \
9 --disable-log-stats --disable-log-requests --disable-custom-all-reduce \
10 --enable_chunked_prefill --max_num_batched_tokens 8192 \
11 --tensor-parallel-size "${PROC_PER_NODE}" \
12 --max-model-len "${MAX_MODEL_LEN}" \
13 --gpu_memory_utilization 0.9 \
14 --api-key token-123 &1from openai import OpenAI
2from datasets import load_dataset
3
4client = OpenAI(
5 base_url="http://localhost:8000/v1", # Default vLLM server address
6 api_key="token-123"
7)
8
9ds = load_dataset('self-long/RULER-llama3-1M', f'niah_single_1_4k', split='validation')
10prompt = ds[0]['input']
11
12completion = client.completions.create(
13 model='self-long/SelfLong-Llama3.1-8B-Instruct-1M',
14 prompt=prompt,
15 max_tokens=100,
16)
17
18print(prompt)
19print(completion.choices[0].text)@article{wang2024bootstrap,
title={Bootstrap Your Own Context Length},
author={Wang, Liang and Yang, Nan and Zhang, Xingxing and Huang, Xiaolong and Wei, Furu},
journal={arXiv preprint arXiv:2412.18860},
year={2024}
}