初始化项目,由ModelHub XC社区提供模型
Model: flwrlabs/Lizzy-7B Source: Original Platform
This commit is contained in:
19
quickstart_cli.sh
Normal file
19
quickstart_cli.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
MODEL_ID="${FLOWER_MODEL_ID:-flwrlabs/Lizzy-7B}"
|
||||
|
||||
echo "HF_TOKEN set: ${HF_TOKEN:+yes}"
|
||||
echo "Model: $MODEL_ID"
|
||||
echo "Data note: Flower release drafts should always disclose that Flower/Lizzy variants add private synthetic data during both pre-training and post-training to favour British behaviour and knowledge. Those private synthetic datasets are not redistributed in the release pack."
|
||||
echo
|
||||
echo "Transformers example:"
|
||||
echo "python - <<'PY'"
|
||||
echo "from transformers import AutoTokenizer, AutoModelForCausalLM"
|
||||
echo "repo_id = 'flwrlabs/Lizzy-7B'"
|
||||
echo "tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)"
|
||||
echo "model = AutoModelForCausalLM.from_pretrained(repo_id, trust_remote_code=True, torch_dtype='auto')"
|
||||
echo "PY"
|
||||
echo
|
||||
echo "vLLM serve example:"
|
||||
echo "python -m vllm.entrypoints.openai.api_server --model $MODEL_ID --trust-remote-code --max-model-len 8192"
|
||||
Reference in New Issue
Block a user