yahma/alpaca-cleaned
Viewer โข Updated โข 51.8k โข 20.9k โข 902
How to use burckmeister/tinyllama-e2e-test with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0")
model = PeftModel.from_pretrained(base_model, "burckmeister/tinyllama-e2e-test")How to use burckmeister/tinyllama-e2e-test with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="burckmeister/tinyllama-e2e-test")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("burckmeister/tinyllama-e2e-test")
model = AutoModelForCausalLM.from_pretrained("burckmeister/tinyllama-e2e-test", device_map="auto")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use burckmeister/tinyllama-e2e-test with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "burckmeister/tinyllama-e2e-test"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "burckmeister/tinyllama-e2e-test",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/burckmeister/tinyllama-e2e-test
How to use burckmeister/tinyllama-e2e-test with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "burckmeister/tinyllama-e2e-test" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "burckmeister/tinyllama-e2e-test",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "burckmeister/tinyllama-e2e-test" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "burckmeister/tinyllama-e2e-test",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use burckmeister/tinyllama-e2e-test with Docker Model Runner:
docker model run hf.co/burckmeister/tinyllama-e2e-test
axolotl version: 0.13.0.dev0
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer
load_in_8bit: false
load_in_4bit: true
strict: false
chat_template: llama3
datasets:
- path: yahma/alpaca-cleaned
type: alpaca
field_instruction: instruction
field_input: input
field_output: output
dataset_prepared_path: null
val_set_size: 0.0
output_dir: /workspace/axolotl/outputs
sequence_len: 256
sample_packing: false
pad_to_sequence_len: true
trust_remote_code: true
adapter: lora
lora_model_dir: null
lora_r: 8
lora_alpha: 16
lora_dropout: 0.05
lora_target_linear: true
lora_fan_in_fan_out: null
gradient_accumulation_steps: 1
micro_batch_size: 1
eval_batch_size: 1
num_epochs: 1
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002
train_on_inputs: false
group_by_length: false
bf16: auto
fp16: null
tf32: false
gradient_checkpointing: false
early_stopping_patience: null
resume_from_checkpoint: null
local_rank: null
logging_steps: 1
xformers_attention: null
flash_attention: true
s2_attention: null
wandb_project: Kurtos-Bittensor
wandb_entity: null
wandb_mode: offline
wandb_run: quick-test
wandb_runid: e2e-test-001
saves_per_epoch: 0
warmup_steps: 0
evals_per_epoch: 0
eval_table_size: null
eval_max_new_tokens: 128
max_steps: 3
debug: null
deepspeed: null
weight_decay: 0.0
fsdp: null
fsdp_config: null
wandb_name: e2e-test-001
hub_model_id: burckmeister/tinyllama-e2e-test
hub_strategy: end
This model is a fine-tuned version of TinyLlama/TinyLlama-1.1B-Chat-v1.0 on the yahma/alpaca-cleaned dataset.
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
Base model
TinyLlama/TinyLlama-1.1B-Chat-v1.0