yahma/alpaca-cleaned
Viewer • Updated • 51.8k • 31.5k • 827
How to use HarrySoteriou/smoke-test-output with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("unsloth/Llama-3.2-1B-Instruct")
model = PeftModel.from_pretrained(base_model, "HarrySoteriou/smoke-test-output")How to use HarrySoteriou/smoke-test-output with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="HarrySoteriou/smoke-test-output")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("HarrySoteriou/smoke-test-output")
model = AutoModelForCausalLM.from_pretrained("HarrySoteriou/smoke-test-output")
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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use HarrySoteriou/smoke-test-output with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "HarrySoteriou/smoke-test-output"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "HarrySoteriou/smoke-test-output",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/HarrySoteriou/smoke-test-output
How to use HarrySoteriou/smoke-test-output with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "HarrySoteriou/smoke-test-output" \
--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": "HarrySoteriou/smoke-test-output",
"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 "HarrySoteriou/smoke-test-output" \
--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": "HarrySoteriou/smoke-test-output",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use HarrySoteriou/smoke-test-output with Docker Model Runner:
docker model run hf.co/HarrySoteriou/smoke-test-output
axolotl version: 0.14.0
base_model: unsloth/Llama-3.2-1B-Instruct
model_type: AutoModelForCausalLM
adapter: qlora
load_in_4bit: true
bnb_4bit_quant_type: nf4
bnb_4bit_use_double_quant: true
bnb_4bit_compute_dtype: bfloat16
lora_r: 16
lora_alpha: 32
lora_dropout: 0.05
lora_target_linear: true
datasets:
- path: yahma/alpaca-cleaned
type: alpaca
sequence_len: 2048
micro_batch_size: 1
gradient_accumulation_steps: 4
num_epochs: 1
max_steps: 10
learning_rate: 0.0002
optimizer: adamw_bnb_8bit
lr_scheduler_type: cosine
warmup_steps: 10
flash_attention: false
gradient_checkpointing: true
bf16: auto
logging_steps: 10
save_steps: 100
output_dir: /app/results/7a775f96-133a-44da-975d-d4875774c579
push_to_hub: true
hub_model_id: HarrySoteriou/smoke-test-output
hf_use_auth_token: true
This model is a fine-tuned version of unsloth/Llama-3.2-1B-Instruct on the yahma/alpaca-cleaned dataset.
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
Base model
meta-llama/Llama-3.2-1B-Instruct