Instructions to use IndexTeam/Index-1.9B-Constant-LR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IndexTeam/Index-1.9B-Constant-LR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IndexTeam/Index-1.9B-Constant-LR", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("IndexTeam/Index-1.9B-Constant-LR", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use IndexTeam/Index-1.9B-Constant-LR with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IndexTeam/Index-1.9B-Constant-LR" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IndexTeam/Index-1.9B-Constant-LR", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/IndexTeam/Index-1.9B-Constant-LR
- SGLang
How to use IndexTeam/Index-1.9B-Constant-LR 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 "IndexTeam/Index-1.9B-Constant-LR" \ --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": "IndexTeam/Index-1.9B-Constant-LR", "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 "IndexTeam/Index-1.9B-Constant-LR" \ --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": "IndexTeam/Index-1.9B-Constant-LR", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use IndexTeam/Index-1.9B-Constant-LR with Docker Model Runner:
docker model run hf.co/IndexTeam/Index-1.9B-Constant-LR
| license: other | |
| license_name: license | |
| license_link: LICENSE | |
| <div align="center"> | |
| <h1> | |
| Index-1.9B | |
| </h1> | |
| </div> | |
| ## 模型介绍 | |
| 我们很高兴首次发布Index系列模型中的轻量版本:Index-1.9B系列 | |
| 本次开源的Index-1.9B 系列包含以下模型: | |
| - **Index-1.9B base(本仓库模型)** : 基座模型,具有 19亿 非词嵌入参数量,在2.8T 中英文为主的语料上预训练,多个评测基准上与同级别模型比处于领先. | |
| - Index-1.9B pure : 基座模型的对照组,与base具有相同的参数和训练策略,不同之处在于我们严格过滤了该版本语料中所有指令相关的数据,以此来验证指令对benchmark的影响 | |
| - Index-1.9B chat: 基于index-1.9B base通过SFT和DPO对齐后的对话模型,我们发现由于我们预训练中引入了较多互联网社区语料,聊天的趣味性明显更强 | |
| - Index-1.9B character : 在SFT和DPO的基础上引入了RAG来实现fewshots角色扮演定制 | |
| **注意:此为Base模型,仅能续写,以及进一步的训练对齐,不能直接交互。** | |
| - **Chat模型**详见 [Index-1.9B-Chat](https://modelscope.cn/models/IndexTeam/Index-1.9B-Chat/summary) | |
| - **角色扮演模型**详见 [Index-1.9B-Character](https://modelscope.cn/models/IndexTeam/Index-1.9B-Character/summary) | |
| 更多细节详见我们的[GitHub](https://github.com/bilibili/Index-1.9B)和[Index-1.9B技术报告](https://github.com/bilibili/Index-1.9B/blob/main/Index-1.9B%20%E6%8A%80%E6%9C%AF%E6%8A%A5%E5%91%8A.pdf) | |
| ## 评测结果 | |
| 对通用理解进行评测,Index-1.9B性能优秀,于近期开源的端侧小模型相比领先,并可以和一批7B和大于10B的模型相比较 | |
| |模型|均分|英文均分|MMLU|CEVAL|CMMLU|HellaSwag|Arc-C|Arc-E| | |
| |----|----|----|----|----|----|----|----|----| | |
| |Google Gemma 2B|41.58|46.77|41.81|31.36|31.02|66.82|36.39|42.07| | |
| |Phi-2 (2.7B)|58.89|**72.54**|57.61|31.12|32.05|70.94|74.51|87.1| | |
| |Qwen1.5-1.8B|58.96|59.28|47.05|59.48|57.12|58.33|56.82|74.93| | |
| |Qwen2-1.5B(report)|**65.17**|62.52 |56.5|70.6|70.3|66.6|43.9|83.09| | |
| |MiniCPM-2.4B-SFT|62.53|68.75|53.8|49.19|50.97|67.29|69.44|84.48| | |
| |**Index-1.9B-Pure**|49.55 |52.83 |43.75|42.35|43.61|63.21|42.75|61.61| | |
| |**Index-1.9B**|**64.92** |**69.93**|52.53|57.01|52.79|80.69|65.15|81.35| | |
| |Llama2-7B|50.79|60.31|44.32|32.42|31.11|76|46.3|74.6| | |
| |Mistral-7B (report) |/|**69.23**|60.1|/|/|81.3|55.5|80| | |
| |Baichuan2-7B|54.53|53.51|54.64|56.19|56.95|25.04|57.25|77.12| | |
| |Llama2-13B|57.51|66.61|55.78|39.93|38.7|76.22|58.88|75.56| | |
| |Baichuan2-13B|68.90|71.69|59.63|59.21|61.27|72.61|70.04|84.48| | |
| |MPT-30B (report)|/|63.48|46.9|/|/|79.9|50.6|76.5| | |
| |Falcon-40B (report)|/|68.18|55.4|/|/|83.6|54.5|79.2| | |
| 评测代码基于[OpenCompass](https://github.com/open-compass/opencompass), 并做了适配性修改,详见[evaluate代码](https://github.com/bilibili/Index-1.9B/evaluate/) | |