---
title: Index-1.9B-Chat
canonical_url: "https://www.modelscope.cn/models/IndexTeam/Index-1.9B-Chat"
md_url: "https://www.modelscope.cn/models/IndexTeam/Index-1.9B-Chat.md"
repository: IndexTeam/Index-1.9B-Chat
last_updated: 2025-03-28
license: other
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - index
architectures:
  - IndexForCausalLM
library_name:
  - transformer
  - pytorch
frameworks:
  - Pytorch
downloads: 2139
stars: 10
---

# Index-1.9B-Chat

> Index-1.9B-Chat - IndexTeam 在 ModelScope 开源的模型。We are excited to announce the release of a lightweight version from the Index series models: the Index-1.9B series. The open-source Index-1.9B series includes the following models: Index-1.9B base: The base…

IndexTeam/Index-1.9B-Chat 是 ModelScope 魔搭社区上的text-generation模型，采用 other 许可。

- **Repository**: IndexTeam/Index-1.9B-Chat
- **License**: other
- **Tasks**: text-generation
- **Downloads**: 2139
- **Stars**: 10
- **Last updated**: 2025-03-28

Source: https://www.modelscope.cn/models/IndexTeam/Index-1.9B-Chat

---

<div align="center">
<h1>
  Index-1.9B-Chat
</h1>
</div>

## Model Introduction

We are excited to announce the release of a lightweight version from the Index series models: the Index-1.9B series.
 The open-source Index-1.9B series includes the following models:
- Index-1.9B base: The base model, with 1.9 billion non-embedding parameters, pre-trained on a 2.8T corpus mainly in Chinese and English. It leads in multiple evaluation benchmarks compared to models of the same level. 
- Index-1.9B pure : A control version of the base model with the same parameters and training strategy, but strictly filtered out all instruction-related data from the corpus to verify the impact of instructions on benchmarks.
- **Index-1.9B chat (this repository's model)** : A dialogue model aligned with SFT and DPO based on the Index-1.9B base. We found that due to the introduction of a lot of internet community corpus in our pre-training, the model has significantly more interesting chatting capabilities.
- Index-1.9B character : Introduces RAG on top of SFT and DPO to achieve few-shots role-playing customization.

Adapted to llamacpp and Ollama, see [Index-1.9B-Chat-GGUF](https://huggingface.co/IndexTeam/Index-1.9B-Chat-GGUF)

For more details, see our [GitHub](https://github.com/bilibili/Index-1.9B) and [Index-1.9B Technical Report](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)

### Loading with Transformers

You can load the Index-1.9B-Chat model for dialogue using the following code:

```python
import argparse
from transformers import AutoTokenizer, pipeline

# Attention! The directory must not contain "." and can be replaced with "_".
parser = argparse.ArgumentParser()
parser.add_argument('--model_path', default="IndexTeam/Index-1.9B-Chat", type=str, help="")
parser.add_argument('--device', default="cpu", type=str, help="") # also could be "cuda" or "mps" for Apple silicon
args = parser.parse_args()

tokenizer = AutoTokenizer.from_pretrained(args.model_path, trust_remote_code=True)
generator = pipeline("text-generation",
                    model=args.model_path,
                    tokenizer=tokenizer, trust_remote_code=True, 
                    device=args.device)


system_message = "你是由哔哩哔哩自主研发的大语言模型，名为“Index”。你能够根据用户传入的信息，帮助用户完成指定的任务，并生成恰当的、符合要求的回复。"
query = "续写 天不生我金坷垃"
model_input = []
model_input.append({"role": "system", "content": system_message})
model_input.append({"role": "user", "content": query})

model_output = generator(model_input, max_new_tokens=300, top_k=5, top_p=0.8, temperature=0.3, repetition_penalty=1.1, do_sample=True)

print('User:', query)
print('Model:', model_output)
```
