Instructions to use YeungNLP/firefly-bloom-1b4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use YeungNLP/firefly-bloom-1b4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="YeungNLP/firefly-bloom-1b4")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("YeungNLP/firefly-bloom-1b4") model = AutoModelForCausalLM.from_pretrained("YeungNLP/firefly-bloom-1b4") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use YeungNLP/firefly-bloom-1b4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "YeungNLP/firefly-bloom-1b4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YeungNLP/firefly-bloom-1b4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/YeungNLP/firefly-bloom-1b4
- SGLang
How to use YeungNLP/firefly-bloom-1b4 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 "YeungNLP/firefly-bloom-1b4" \ --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": "YeungNLP/firefly-bloom-1b4", "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 "YeungNLP/firefly-bloom-1b4" \ --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": "YeungNLP/firefly-bloom-1b4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use YeungNLP/firefly-bloom-1b4 with Docker Model Runner:
docker model run hf.co/YeungNLP/firefly-bloom-1b4
Update README.md
Browse files
README.md
CHANGED
|
@@ -98,6 +98,7 @@ Bloom是个多语言模型,由于需要兼容多语言,所以词表有25w之
|
|
| 98 |
|
| 99 |
## 局限性和使用限制
|
| 100 |
经过词表裁剪后,我们的模型参数量仅为1.4B和2.6B,参数量远远小于ChatGPT和LLaMA等上百亿上千亿的模型,甚至远远小于当前主流如Belle、ChatGLM等7B左右的模型。所以在效果上仍存在以下问题:
|
|
|
|
| 101 |
- 对于事实性知识,容易产生错误的回复。
|
| 102 |
- 由于未经过无害化微调,可能会产生歧视、危害、违背伦理道德的言论。
|
| 103 |
- 在代码、推理上的能力仍有欠缺。
|
|
@@ -117,6 +118,10 @@ Bloom是个多语言模型,由于需要兼容多语言,所以词表有25w之
|
|
| 117 |
}
|
| 118 |
```
|
| 119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
## 生成效果
|
| 121 |
下面展示的是firefly-1b4的部分生成效果。
|
| 122 |
|
|
@@ -162,10 +167,6 @@ Bloom是个多语言模型,由于需要兼容多语言,所以词表有25w之
|
|
| 162 |
| 根据下面的歌词,进行续写:窗外的麻雀,在电线杆上多嘴 | 说着什么</br>我却听不懂</br>你眼里的泪水,是那么的清澈</br>像一滴晶莹剔透的露珠</br>落在我的指尖</br>你的心事,在我眼中</br>就像那落叶飘零的季节</br>你的爱恋,在我心中</br>就像那落花凋谢的瞬间</br>窗外的小鸟儿</br>在枝头唱起歌谣</br>诉说我的一切</br>我却听不清</br>你眼中的眼泪,是那么的清澈</br>像一滴晶莹剔透的露珠</br>落在我的指尖</br>你的心事,在我眼中</br>就像那落叶飘零的季节</br>你的爱恋,在我心中</br>就像那落花凋谢的瞬间</br>窗外的小鸟儿</br>在枝头唱起歌谣</br>诉说我的一切</br>我却听不清</br>窗外的小鸟儿</br>在枝头唱起歌谣</br>诉说我的一切</br>我却听不清 |
|
| 163 |
|
| 164 |
|
| 165 |
-
## 关注我们
|
| 166 |
-

|
| 168 |
-
|
| 169 |
|
| 170 |
|
| 171 |
|
|
|
|
| 98 |
|
| 99 |
## 局限性和使用限制
|
| 100 |
经过词表裁剪后,我们的模型参数量仅为1.4B和2.6B,参数量远远小于ChatGPT和LLaMA等上百亿上千亿的模型,甚至远远小于当前主流如Belle、ChatGLM等7B左右的模型。所以在效果上仍存在以下问题:
|
| 101 |
+
|
| 102 |
- 对于事实性知识,容易产生错误的回复。
|
| 103 |
- 由于未经过无害化微调,可能会产生歧视、危害、违背伦理道德的言论。
|
| 104 |
- 在代码、推理上的能力仍有欠缺。
|
|
|
|
| 118 |
}
|
| 119 |
```
|
| 120 |
|
| 121 |
+
## 关注我们
|
| 122 |
+

|
| 124 |
+
|
| 125 |
## 生成效果
|
| 126 |
下面展示的是firefly-1b4的部分生成效果。
|
| 127 |
|
|
|
|
| 167 |
| 根据下面的歌词,进行续写:窗外的麻雀,在电线杆上多嘴 | 说着什么</br>我却听不懂</br>你眼里的泪水,是那么的清澈</br>像一滴晶莹剔透的露珠</br>落在我的指尖</br>你的心事,在我眼中</br>就像那落叶飘零的季节</br>你的爱恋,在我心中</br>就像那落花凋谢的瞬间</br>窗外的小鸟儿</br>在枝头唱起歌谣</br>诉说我的一切</br>我却听不清</br>你眼中的眼泪,是那么的清澈</br>像一滴晶莹剔透的露珠</br>落在我的指尖</br>你的心事,在我眼中</br>就像那落叶飘零的季节</br>你的爱恋,在我心中</br>就像那落花凋谢的瞬间</br>窗外的小鸟儿</br>在枝头唱起歌谣</br>诉说我的一切</br>我却听不清</br>窗外的小鸟儿</br>在枝头唱起歌谣</br>诉说我的一切</br>我却听不清 |
|
| 168 |
|
| 169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
|
| 171 |
|
| 172 |
|