ola13/small-the_pile
Viewer • Updated • 100k • 947 • 8
How to use Defalt-404/GPT-6B_Tuned_small_pile with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Defalt-404/GPT-6B_Tuned_small_pile") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Defalt-404/GPT-6B_Tuned_small_pile")
model = AutoModelForCausalLM.from_pretrained("Defalt-404/GPT-6B_Tuned_small_pile")How to use Defalt-404/GPT-6B_Tuned_small_pile with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Defalt-404/GPT-6B_Tuned_small_pile"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Defalt-404/GPT-6B_Tuned_small_pile",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/Defalt-404/GPT-6B_Tuned_small_pile
How to use Defalt-404/GPT-6B_Tuned_small_pile with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Defalt-404/GPT-6B_Tuned_small_pile" \
--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": "Defalt-404/GPT-6B_Tuned_small_pile",
"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 "Defalt-404/GPT-6B_Tuned_small_pile" \
--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": "Defalt-404/GPT-6B_Tuned_small_pile",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use Defalt-404/GPT-6B_Tuned_small_pile with Docker Model Runner:
docker model run hf.co/Defalt-404/GPT-6B_Tuned_small_pile
GPT-6B_Tuned_small_pile is a GPT-j-6B model trained on 0.1 million example of pile dataset.
n_embd: 4096, n_layer: 28, n_positions: 2048
Tuning Parameters:
val_split_percent: 20,
momentum: 0.9
train_batch_size (eff) : 32
train_micro_batch: 16
gradient_accumulation_steps: 2
gradient_clipping: 0.5
learning_rate: 0.00001
weight_decay: 0.01
lr_schedular: cosine
lr_warmup_steps: 1000
lr_decay: 0.1
lr_decay_step: 2000
mixed_precision: bf16