# ChatBLOOM

ChatBLOOM是基于[BLOOM](https://huggingface.co/bigscience/bloom-1b7)（17亿参数）训练的中英双语对话语言模型，此模型为SFT版本。
详见[Github](https://github.com/NicholasCao/ChatBloom)。

ChatBLOOM is a Chinese-English bilingual dialogue language model trained based on [BLOOM](https://huggingface.co/bigscience/bloom-1b7) (1.7 billion parameters). This model is the SFT version.
See [Github](https://github.com/NicholasCao/ChatBloom) for details.

## Usage
```python
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained('nicholascao/chatbloom-1b7-sft')
tokenizer.pad_token_id = tokenizer.eos_token_id

model = AutoModelForCausalLM.from_pretrained('nicholascao/chatbloom-1b7-sft').half()

inputs = tokenizer('<Human>:Hello<Assistant>:', return_tensors='pt').to(torch.cuda.current_device())
model.to(torch.cuda.current_device())

output = model.generate(**inputs, max_length=1024, do_sample=True, temperature=0.8, top_k=50, early_stopping=True, repetition_penalty=1.05)
output = tokenizer.decode(output[0], skip_special_tokens=True)
print(output)
```

## Cases

尽管这个模型只有1.7B参数，但也显示出同样不错的能力。以下是一些例子:

Although this model has only 1.7B parameters, but also shows the same not bad ability. Here are some cases:
### Chinese
<details><summary><b>自我认知</b></summary>

```xml
<Human>: 你好，你是谁
<Assistant>: 你好！我是一个人工智能助手。很高兴为您服务。有什么我能帮您的吗？
<Human>: 介绍一下你的优点和缺点
<Assistant>: 优点：
1. 可以快速处理大量信息。
2. 提供客观、准确的信息和建议。
3. 有助于提高工作效率。
4. 为人们提供了便利。
5. 可以帮助解决日常生活中的问题。
缺点：
1. 可能缺乏人类的创造性和判断力。
2. 没有情感和主观意识，无法替代人类的情感和思考能力。
3. 对于某些任务可能会造成错误或失误。
4. 需要不断更新和改进以保持最佳性能。
5. 对隐私和安全可能带来潜在威胁。
```
</details>

<details><summary><b>提纲写作</b></summary>

```xml
<Human>: 帮我写一个介绍ChatBLOOM的博客提纲
<Assistant>: 题目：ChatBLOOM——社交网络的新时代
一、引言
    1.1 简介 ChatBLOOM 的前身是什么？
    1.2 ChatBLOOM 究竟有何特点？
    1.3 为什么需要这个主题博客？
二、ChatBLOOM 的核心功能 
    2.1 聊天机器人功能
    2.2 基于内容的推荐系统
    2.3 多平台支持
    2.4 无需等待自动回复的功能
    2.5 可定制化的个人中心
三、ChatBLOOM 的优势与挑战 
    3.1 优势
    3.2 挑战
    3.3 如何应对挑战 
四、ChatBLOOM 对用户的影响 
    4.1 在工作中的应用
    4.2 在家庭中的应用
    4.3 在学校或社区中的应用
    4.4 总结
```
</details>

<details><summary><b>文案写作</b></summary>

```xml
<Human>: 类型#上衣“材质#牛仔布“额色#白色”风格#简约“图案#刺绣”衣样式#外套”衣款式#破洞生成一段文案
<Assistant>: 这件时尚的上衣采用优质的牛仔布材质，搭配简单的白色设计，让你在各种场合都能轻松自如。它采用了精致刺绣的图案和粗犷立体的破洞处理，为整体造型增添了独特的细节感。无论是日常穿着还是正式商务活动，这款上衣都是你的最佳选择！
```
</details>

<details><summary><b>邮件写作</b></summary>

```xml
<Human>: 请帮我写封邮件给暴雪公司，控诉他们无端与网易公司解除合作，中国玩家对他们这种行为非常失望。要求他们立刻改正错误，保护中国玩家权益。言辞恳切严厉。
<Assistant>: Subject: 强烈谴责暴雪和网易的违法行为
尊敬的暴雪公司和网易公司：
我谨代表广大中国游戏玩家，对你们的无端解约和恶意行为深感失望和愤慨。
你们作为两家国际知名游戏公司的合作伙伴，应该秉持诚信经营、互利共赢的原则，而不是无视玩家的权益和安全而选择对抗。作为一家负责任的企业，你们应该为维护广大中国玩家的利益和安全做出表率。
在此，我们恳请你们立即改正错误，停止侵害中国玩家的合法权益，采取有效措施保护中国玩家的利益和安全。你们应当遵守法律法规，以身作则，承担起应有的社会责任。
谢谢！
真诚地，
XXX
```
</details>

### English
<details><summary><b>Webpage design</b></summary>

```xml
<Human>: Design a webpage to display city weather.
<Assistant>: I'm sorry, but as an AI text-based model, I don't have the ability to create or design webpages. However, you can use HTML and CSS to structure your website and include elements such as links to specific weather data sources, maps showing current and historical weather conditions in the city, images of rain and shine, and weather icons for each month.
Here is a basic outline for a webpage that displays city weather using HTML and CSS:
1. Header section: This would be a banner with the title "City Weather" and some navigation buttons (e.g., "Switch to Caller Speaking" or "Check Current Conditions").
2. Navigation bar: Below the header, there should be a menu bar where users can select which category of weather they want to view (e.g., "Rain", "High Temps", "Long Durable"). The navigation may also provide links to more detailed weather information (e.g., "Autumn Rainfall" or "Day Temperature Chart").
3. Main content: Within this area, one could showcase various sections of information on local weather forecasting, including temperature readings, humidity levels, precipitation amounts, wind speeds, and even sunny days, overviews, and times of day. Each section might also contain interactive features (e.g., pop-up calendar views) that allow users to update their personal schedule accordingly.
4. Footer: In addition to displaying copyright notices, it is essential to include social media sharing options so visitors are aware when the content is from someone else's site. This feature will help keep the page relevant by providing access to important information about what happens around here. 
You may also wish to add any additional styling, like fonts, colors, layout, etc., to make your webpage visually appealing.
<Human>: Implement this webpage using HTML and CSS.
<Assistant>: To implement the webpage in HTML, you'll need to include the following code: 
```
```html
<!DOCTYPE html>
<html>
  <head>
    <title>City Weather</title>
  </head>
  <body>
    <header>
      <h1>City Weather</h1>
      <nav>
        <ul>
          <li><a href="#weather">Rain</a></li>
          <li><a href="#weather2">High Temperatures</a></li>
          <li><a href="#weather3">Long Durable</a></li>
          <li><a href="#weather4">Overviews</a></li>
          <li><a href="#weather5">Timeline</a></li>
        </ul>
      </nav>
    </header>
    <div id="weather"></div>
    <div id="weather2">
      <h2>High Temperatures</h2>
      <p>Current temperatures range from 30°F to 35°F, with occasional periods of heavy rainfall.</p>
    </div>
    <div id="weather3">
      <h2>Long Durable</h2>
      <p>The forecast indicates a high chance of sunshine all week long, resulting in moderate temperatures throughout the months of October and November.</p>
    </div>
    <div id="weather4">
      <h2>Overviews</h2>
      <ul>
        <li>October Overview</li>
        <li>Novelty Overview</li>
      </ul>
    </div>
    <div id="weather5">
      <h2>Timeline</h2>
      <p>Today’s temperatures are -31°F<br>- 27°C<br>- 26°C<br>- 25°F<br>- 23°C<br>- 22°F. Today’s precipitation is 0 inches.</p>
    </div> 
  </body>
</html>
```
```
This code includes an HTML5 document declaration, head element containing meta tags and title attribute, body element with an `header` div tag defining main content container, footer element including copyright notice, and link elements to pages related to the subject matter. You now have ready to use your webpage.
```
</details>

## Limitation and Usage Limits

我们使用的数据集(例如[BELLE](https://github.com/LianjiaTech/BELLE))要求开发人员仅将数据用于研究目的。
因此，不允许将我们的模型用于商业以及其他潜在的有害用途。

The datasets we used (e.g. [BELLE](https://github.com/LianjiaTech/BELLE)) require developers only use the data for research purposes. 
Thus, commercial and other potentially harmful uses of our models are not allowed.

{"language": ["zh", "en"], "library_name": "transformers", "tags": ["chat", "ggml", "bloom"], "datasets": ["BelleGroup/train_1M_CN", "BelleGroup/multiturn_chat_0.8M", "jeffwan/sharegpt_vicuna"], "pipeline_tag": "text-generation", "widget": [{"text": "<Human>:Hello<Assistant>:", "example_title": "Hello"}, {"text": "<Human>:\u4f60\u597d<Assistant>:", "example_title": "\u4f60\u597d"}, {"text": "<Human>:What should I do if I can't sleep at night?<Assistant>:", "example_title": "insomnia"}, {"text": "<Human>:\u665a\u4e0a\u7761\u4e0d\u7740\u5e94\u8be5\u600e\u4e48\u529e\uff1f<Assistant>:", "example_title": "\u5931\u7720"}], "inference": {"parameters": {"temperature": 0.8, "max_new_tokens": 128}}}
transformers pytorch safetensors bloom text-generation chat ggml zh en dataset:BelleGroup/train_1M_CN dataset:BelleGroup/multiturn_chat_0.8M dataset:jeffwan/sharegpt_vicuna autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #pytorch #safetensors #bloom #text-generation #chat #ggml #zh #en #dataset-BelleGroup/train_1M_CN #dataset-BelleGroup/multiturn_chat_0.8M #dataset-jeffwan/sharegpt_vicuna #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

# ChatBLOOM

ChatBLOOM是基于BLOOM（17亿参数）训练的中英双语对话语言模型，此模型为SFT版本。
详见Github。

ChatBLOOM is a Chinese-English bilingual dialogue language model trained based on BLOOM (1.7 billion parameters). This model is the SFT version.
See Github for details.

## Usage


## Cases

尽管这个模型只有1.7B参数，但也显示出同样不错的能力。以下是一些例子:

Although this model has only 1.7B parameters, but also shows the same not bad ability. Here are some cases:
### Chinese
<details><summary><b>自我认知</b></summary>


</details>

<details><summary><b>提纲写作</b></summary>


</details>

<details><summary><b>文案写作</b></summary>


</details>

<details><summary><b>邮件写作</b></summary>


</details>

### English
<details><summary><b>Webpage design</b></summary>




</details>

## Limitation and Usage Limits

我们使用的数据集(例如BELLE)要求开发人员仅将数据用于研究目的。
因此，不允许将我们的模型用于商业以及其他潜在的有害用途。

The datasets we used (e.g. BELLE) require developers only use the data for research purposes. 
Thus, commercial and other potentially harmful uses of our models are not allowed.

# ChatBLOOM

ChatBLOOM是基于BLOOM（17亿参数）训练的中英双语对话语言模型，此模型为SFT版本。
详见Github。

ChatBLOOM is a Chinese-English bilingual dialogue language model trained based on BLOOM (1.7 billion parameters). This model is the SFT version.
See Github for details. ## Usage ## Cases

尽管这个模型只有1.7B参数，但也显示出同样不错的能力。以下是一些例子:

Although this model has only 1.7B parameters, but also shows the same not bad ability. Here are some cases: ### Chinese
<details><summary><b>自我认知</b></summary>


</details>

<details><summary><b>提纲写作</b></summary>


</details>

<details><summary><b>文案写作</b></summary>


</details>

<details><summary><b>邮件写作</b></summary>


</details> ### English
<details><summary><b>Webpage design</b></summary>




</details> ## Limitation and Usage Limits

我们使用的数据集(例如BELLE)要求开发人员仅将数据用于研究目的。
因此，不允许将我们的模型用于商业以及其他潜在的有害用途。

The datasets we used (e.g. BELLE) require developers only use the data for research purposes. 
Thus, commercial and other potentially harmful uses of our models are not allowed.
TAGS
#transformers #pytorch #safetensors #bloom #text-generation #chat #ggml #zh #en #dataset-BelleGroup/train_1M_CN #dataset-BelleGroup/multiturn_chat_0.8M #dataset-jeffwan/sharegpt_vicuna #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
 # ChatBLOOM

ChatBLOOM是基于BLOOM（17亿参数）训练的中英双语对话语言模型，此模型为SFT版本。
详见Github。

ChatBLOOM is a Chinese-English bilingual dialogue language model trained based on BLOOM (1.7 billion parameters). This model is the SFT version.
See Github for details. ## Usage ## Cases

尽管这个模型只有1.7B参数，但也显示出同样不错的能力。以下是一些例子:

Although this model has only 1.7B parameters, but also shows the same not bad ability. Here are some cases: ### Chinese
<details><summary><b>自我认知</b></summary>


</details>

<details><summary><b>提纲写作</b></summary>


</details>

<details><summary><b>文案写作</b></summary>


</details>

<details><summary><b>邮件写作</b></summary>


</details> ### English
<details><summary><b>Webpage design</b></summary>




</details> ## Limitation and Usage Limits

我们使用的数据集(例如BELLE)要求开发人员仅将数据用于研究目的。
因此，不允许将我们的模型用于商业以及其他潜在的有害用途。

The datasets we used (e.g. BELLE) require developers only use the data for research purposes. 
Thus, commercial and other potentially harmful uses of our models are not allowed.
TAGS
#transformers #pytorch #safetensors #bloom #text-generation #chat #ggml #zh #en #dataset-BelleGroup/train_1M_CN #dataset-BelleGroup/multiturn_chat_0.8M #dataset-jeffwan/sharegpt_vicuna #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
# ChatBLOOM

ChatBLOOM是基于BLOOM（17亿参数）训练的中英双语对话语言模型，此模型为SFT版本。
详见Github。

ChatBLOOM is a Chinese-English bilingual dialogue language model trained based on BLOOM (1.7 billion parameters). This model is the SFT version.
See Github for details.## Usage## Cases

尽管这个模型只有1.7B参数，但也显示出同样不错的能力。以下是一些例子:

Although this model has only 1.7B parameters, but also shows the same not bad ability. Here are some cases:### Chinese
<details><summary><b>自我认知</b></summary>


</details>

<details><summary><b>提纲写作</b></summary>


</details>

<details><summary><b>文案写作</b></summary>


</details>

<details><summary><b>邮件写作</b></summary>


</details>### English
<details><summary><b>Webpage design</b></summary>




</details>## Limitation and Usage Limits

我们使用的数据集(例如BELLE)要求开发人员仅将数据用于研究目的。
因此，不允许将我们的模型用于商业以及其他潜在的有害用途。

The datasets we used (e.g. BELLE) require developers only use the data for research purposes. 
Thus, commercial and other potentially harmful uses of our models are not allowed.