iamplus/Orca
Viewer • Updated • 2.92M • 31
How to use iamplus/LLama-2-70b-hf-Orca100k with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="iamplus/LLama-2-70b-hf-Orca100k") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("iamplus/LLama-2-70b-hf-Orca100k")
model = AutoModelForCausalLM.from_pretrained("iamplus/LLama-2-70b-hf-Orca100k")How to use iamplus/LLama-2-70b-hf-Orca100k with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "iamplus/LLama-2-70b-hf-Orca100k"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "iamplus/LLama-2-70b-hf-Orca100k",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/iamplus/LLama-2-70b-hf-Orca100k
How to use iamplus/LLama-2-70b-hf-Orca100k with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "iamplus/LLama-2-70b-hf-Orca100k" \
--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": "iamplus/LLama-2-70b-hf-Orca100k",
"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 "iamplus/LLama-2-70b-hf-Orca100k" \
--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": "iamplus/LLama-2-70b-hf-Orca100k",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use iamplus/LLama-2-70b-hf-Orca100k with Docker Model Runner:
docker model run hf.co/iamplus/LLama-2-70b-hf-Orca100k
Base model : meta-llama/Llama-2-70b-hf
Data : 100k from 1M Gpt-4 Orca data (Dolphin)
Training Params :
batch_size_training: '16'
checkpoint_type: StateDictType.FULL_STATE_DICT
dataset: orca_dolphin_100k_gpt4
dist_checkpoint_folder: fine-tuned
dist_checkpoint_root_folder: model_checkpoints
enable_fsdp: 'True'
freeze_layers: 'False'
fsdp_activation_checkpointing: 'True'
gamma: '0.85'
low_cpu_fsdp: 'True'
lr: 1e-05
micro_batch_size: '16'
mixed_precision: 'True'
model_name: meta-llama/Llama-2-70b-hf
num_epochs: '1'
num_freeze_layers: '1'
num_workers_dataloader: '1'
one_gpu: 'False'
optimizer: anyprecision
output_dir: ~/llama-recipes-70b/output
peft_method: lora
pure_bf16: 'True'
quantization: 'False'
run_validation: 'True'
save_model: 'True'
save_optimizer: 'True'
seed: '42'
sharding_strategy: ShardingStrategy.FULL_SHARD
use_fast_kernels: (False,)
use_fp16: 'False'
use_peft: 'False'
val_batch_size: '16'
weight_decay: '0.0'