Instructions to use andreaskoepf/oasst-sft-2-pythia-12b-4000 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use andreaskoepf/oasst-sft-2-pythia-12b-4000 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="andreaskoepf/oasst-sft-2-pythia-12b-4000")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("andreaskoepf/oasst-sft-2-pythia-12b-4000") model = AutoModelForCausalLM.from_pretrained("andreaskoepf/oasst-sft-2-pythia-12b-4000", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use andreaskoepf/oasst-sft-2-pythia-12b-4000 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "andreaskoepf/oasst-sft-2-pythia-12b-4000" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "andreaskoepf/oasst-sft-2-pythia-12b-4000", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/andreaskoepf/oasst-sft-2-pythia-12b-4000
- SGLang
How to use andreaskoepf/oasst-sft-2-pythia-12b-4000 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "andreaskoepf/oasst-sft-2-pythia-12b-4000" \ --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": "andreaskoepf/oasst-sft-2-pythia-12b-4000", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
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 "andreaskoepf/oasst-sft-2-pythia-12b-4000" \ --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": "andreaskoepf/oasst-sft-2-pythia-12b-4000", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use andreaskoepf/oasst-sft-2-pythia-12b-4000 with Docker Model Runner:
docker model run hf.co/andreaskoepf/oasst-sft-2-pythia-12b-4000
wandb: https://wandb.ai/open-assistant/supervised-finetuning/runs/20enq5u1
Config:
oasst_export_latin_cyrillic_alpaca:
datasets:
- oasst_export:
lang: "bg,ca,cs,da,de,en,es,fr,hr,hu,it,nl,pl,pt,ro,ru,sl,sr,sv,uk"
#top_k: 2
input_file_path: 2023-03-25_oasst_research_ready_synth_labels.jsonl.gz
- alpaca
sort_by_length: false
use_custom_sampler: false
pythia-12b:
fp16: true
use_flash_attention: true
residual_dropout: 0.2
learning_rate: 6e-6
model_name: EleutherAI/pythia-12b-deduped
output_dir: pythia_model_12b
weight_decay: 0.0
max_length: 2048
warmup_steps: 100
gradient_checkpointing: false
gradient_accumulation_steps: 4
per_device_train_batch_size: 2
per_device_eval_batch_size: 2
eval_steps: 200
save_steps: 1000
num_train_epochs: 8
save_total_limit: 4
Command used:
deepspeed trainer_sft.py --configs defaults oasst_export_latin_cyrillic_alpaca pythia-12b --cache_dir .cache/ --output_dir .saved_models/oasst-sft-2_12b --deepspeed
- Downloads last month
- 17