How to use from
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 "yuanzhoulvpi/chinese_falcon_7b_chat" \
    --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": "yuanzhoulvpi/chinese_falcon_7b_chat",
		"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 "yuanzhoulvpi/chinese_falcon_7b_chat" \
        --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": "yuanzhoulvpi/chinese_falcon_7b_chat",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Quick Links

介绍

  1. 使用了大概几万条的数据,对falcon-7b模型做了sft,这里分享出我的模型权重
  2. falcon-7b是支持中文语言的。

效果

  1. 效果其实一般,没有bloom-7b效果好。有人甚至反映,连bloom-1b都干不过。
  2. 这里分享我的bloom-7b-v2模型权重https://huggingface.co/yuanzhoulvpi/chinese_bloom_7b_chat_v2

说个冷知识

  1. falcon-7b模型,在结构上是和bloom差不多的,但是添加了RotaryEmbedding、memorry_efficient_attention。
  2. 因此如果想要对falcon-7b做sft的话,可以看我之前训练bloom的代码https://github.com/yuanzhoulvpi2017/zero_nlp/tree/main/chinese_bloom
Downloads last month
18
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Datasets used to train yuanzhoulvpi/chinese_falcon_7b_chat