jeiku/Writing
Viewer • Updated • 541 • 28
How to use hardlyworking/Aura-12B-FT with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="hardlyworking/Aura-12B-FT")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("hardlyworking/Aura-12B-FT")
model = AutoModelForCausalLM.from_pretrained("hardlyworking/Aura-12B-FT")
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 hardlyworking/Aura-12B-FT with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "hardlyworking/Aura-12B-FT"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "hardlyworking/Aura-12B-FT",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/hardlyworking/Aura-12B-FT
How to use hardlyworking/Aura-12B-FT with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "hardlyworking/Aura-12B-FT" \
--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": "hardlyworking/Aura-12B-FT",
"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 "hardlyworking/Aura-12B-FT" \
--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": "hardlyworking/Aura-12B-FT",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use hardlyworking/Aura-12B-FT with Docker Model Runner:
docker model run hf.co/hardlyworking/Aura-12B-FT
axolotl version: 0.8.0.dev0
base_model: hardlyworking/Aura-12B
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer
load_in_8bit: false
load_in_4bit: false
strict: false
datasets:
- path: hardlyworking/LighterRPSet
type: chat_template
chat_template: chatml
roles_to_train: ["gpt"]
field_messages: conversations
message_field_role: from
message_field_content: value
train_on_eos: turn
- path: jeiku/Writing
type: completion
field: text
shuffle_merged_datasets: true
dataset_prepared_path:
val_set_size: 0.01
output_dir: ./output/out
plugins:
- axolotl.integrations.liger.LigerPlugin
liger_rope: true
liger_rms_norm: true
liger_layer_norm: true
liger_glu_activation: true
liger_fused_linear_cross_entropy: true
hub_model_id: hardlyworking/Test12B
hub_strategy: "all_checkpoints"
push_dataset_to_hub:
hf_use_auth_token: true
sequence_len: 8192
sample_packing: true
eval_sample_packing: false
pad_to_sequence_len: true
wandb_project: Aura-12B
wandb_entity:
wandb_watch:
wandb_name: Aura-12B
wandb_log_model:
gradient_accumulation_steps: 8
micro_batch_size: 1
num_epochs: 2
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 5e-6
train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false
gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
max_grad_norm: 0.01
warmup_ratio: 0.1
evals_per_epoch: 2
eval_table_size:
eval_max_new_tokens:
saves_per_epoch: 1
debug:
deepspeed:
weight_decay: 0.05
fsdp:
fsdp_config:
special_tokens:
This model is a fine-tuned version of hardlyworking/Aura-12B on the hardlyworking/LighterRPSet and the jeiku/Writing datasets. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.2984 | 0.0048 | 1 | 2.5678 |
| 1.8777 | 0.5009 | 104 | 2.2361 |
| 2.5154 | 1.0048 | 208 | 2.2155 |
| 1.8757 | 1.5057 | 312 | 2.2116 |