Yale-LILY/aeslc
Viewer • Updated • 18.3k • 1.35k • 19
How to use postbot/bloom-1b1-emailgen with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="postbot/bloom-1b1-emailgen") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("postbot/bloom-1b1-emailgen")
model = AutoModelForCausalLM.from_pretrained("postbot/bloom-1b1-emailgen")How to use postbot/bloom-1b1-emailgen with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "postbot/bloom-1b1-emailgen"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "postbot/bloom-1b1-emailgen",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/postbot/bloom-1b1-emailgen
How to use postbot/bloom-1b1-emailgen with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "postbot/bloom-1b1-emailgen" \
--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": "postbot/bloom-1b1-emailgen",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "postbot/bloom-1b1-emailgen" \
--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": "postbot/bloom-1b1-emailgen",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use postbot/bloom-1b1-emailgen with Docker Model Runner:
docker model run hf.co/postbot/bloom-1b1-emailgen
This model is a fine-tuned version of bigscience/bloom-1b1 on the postbot/multi-emails-100k dataset.
It achieves the following results on the evaluation set:
More information needed
⚠️ this model did not have any of the original layers frozen during training ⚠️
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.8465 | 1.0 | 256 | 1.8656 |
| 1.4903 | 2.0 | 512 | 1.7396 |
***** eval metrics *****
epoch = 2.0
eval_loss = 1.7397
eval_runtime = 0:04:27.41
eval_samples = 4216
eval_samples_per_second = 15.766
eval_steps_per_second = 15.766
perplexity = 5.6956