EleutherAI/pile
Updated • 3.77k • 502
How to use Avelina/lovelace-medium-alpha1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Avelina/lovelace-medium-alpha1") # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("Avelina/lovelace-medium-alpha1", dtype="auto")How to use Avelina/lovelace-medium-alpha1 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Avelina/lovelace-medium-alpha1"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Avelina/lovelace-medium-alpha1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/Avelina/lovelace-medium-alpha1
How to use Avelina/lovelace-medium-alpha1 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Avelina/lovelace-medium-alpha1" \
--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": "Avelina/lovelace-medium-alpha1",
"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 "Avelina/lovelace-medium-alpha1" \
--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": "Avelina/lovelace-medium-alpha1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use Avelina/lovelace-medium-alpha1 with Docker Model Runner:
docker model run hf.co/Avelina/lovelace-medium-alpha1
551M parameter Transformer-XL style model trained on 100B tokens of The Pile!
This model was originally trained for the "Direct Prefrence Heads" paper, but will also be used as the basis for much of my future research. All code used to train and run these models is available here: https://github.com/Avelina9X/direct-preference-heads and our paper is available here: https://arxiv.org/abs/2405.20053
| Name | Value |
|---|---|
| Total Parameters | 551M |
| Non-Embedding Parameters | 512M |
| Vocab Size | 50272 |
| 768 | |
| 1536 | |
| 18 | |
| FFN Activation | SwiGLU |
| 4096 | |
| Attention Type | Full |
| Positon Embedding | Reversed RoPE with ABF |
| 24 | |
| 64 | |
| Trained Context | 2048 |
| Trained Memory | 2048 |
| Max Inference Context | 4096 |
| Model | Link |
|---|---|
| Pre-Trained Model | lovelace-medium-alpha1 |
| Fine-Tuned Model | lovelace-medium-alpha1-sft |
| DPH Aligned Model | lovelace-medium-alpha1-dph |