EleutherAI/proof-pile-2
Updated • 10.6k • 231
How to use Ffohturk/Mila_1L with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Ffohturk/Mila_1L") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Ffohturk/Mila_1L")
model = AutoModelForCausalLM.from_pretrained("Ffohturk/Mila_1L", device_map="auto")How to use Ffohturk/Mila_1L with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Ffohturk/Mila_1L"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Ffohturk/Mila_1L",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/Ffohturk/Mila_1L
How to use Ffohturk/Mila_1L with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Ffohturk/Mila_1L" \
--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": "Ffohturk/Mila_1L",
"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 "Ffohturk/Mila_1L" \
--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": "Ffohturk/Mila_1L",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use Ffohturk/Mila_1L with Docker Model Runner:
docker model run hf.co/Ffohturk/Mila_1L
This is a one-layer base model with the LlaMA 2 architecture trained on 6B tokens of the algebraic-stack part of the Proof-pile 2 dataset.
It's output distribution is thus mostly concerned with code.
The tokenizer is the LlaMA 2 one. I used the following hyper parameters:
dmodel = 512
dff = 2048
nheads = 4
nctx = 1024
For the training I used AdamW with weight decay = 0.05 and cosine annealing with 5000 warmup steps and maximum learning rate 1e-4. We used BF16 precision.
Train loss: 2.6228
Test loss: 2.7490