WokeAI/polititune-tankie-warmup
Viewer • Updated • 1.27k • 10
How to use WokeAI/tankimi-l33-adpt with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("shb777/Llama-3.3-8B-Instruct-128K")
model = PeftModel.from_pretrained(base_model, "WokeAI/tankimi-l33-adpt")How to use WokeAI/tankimi-l33-adpt with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="WokeAI/tankimi-l33-adpt")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("WokeAI/tankimi-l33-adpt")
model = AutoModelForCausalLM.from_pretrained("WokeAI/tankimi-l33-adpt")
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 WokeAI/tankimi-l33-adpt with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "WokeAI/tankimi-l33-adpt"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "WokeAI/tankimi-l33-adpt",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/WokeAI/tankimi-l33-adpt
How to use WokeAI/tankimi-l33-adpt with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "WokeAI/tankimi-l33-adpt" \
--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": "WokeAI/tankimi-l33-adpt",
"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 "WokeAI/tankimi-l33-adpt" \
--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": "WokeAI/tankimi-l33-adpt",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use WokeAI/tankimi-l33-adpt with Docker Model Runner:
docker model run hf.co/WokeAI/tankimi-l33-adpt
axolotl version: 0.13.0.dev0
## model
base_model: shb777/Llama-3.3-8B-Instruct-128K
## qlora COPE!!!
load_in_8bit: false
load_in_4bit: false
strict: false
# === Data Configuration ===
datasets:
- path: WokeAI/polititune-tankie-warmup
type: chat_template
split: train
chat_template: llama3
shuffle_merged_datasets: true
dataset_prepared_path: dataset_prepareds
val_set_size: 0.0
output_dir: ./output
# === LoRA Configuration ===
adapter: lora
lora_r: 64
lora_alpha: 16
lora_dropout: 0.35
lora_target_modules:
lora_target_linear: true
peft_use_rslora: true
max_grad_norm: 0.1
## Liger + CCE
plugins:
- axolotl.integrations.liger.LigerPlugin
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
liger_rope: true
liger_rms_norm: true
liger_layer_norm: true
liger_glu_activation: true
liger_fused_linear_cross_entropy: false
cut_cross_entropy: true
## CTX settings
sequence_len: 4096
sample_packing: true
eval_sample_packing: false
pad_to_sequence_len: true
## WandB
wandb_project: newyear
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:
## hoe params
gradient_accumulation_steps: 2 # ???
micro_batch_size: 2
num_epochs: 2
lr_scheduler: rex
learning_rate: 1e-5
optimizer: adamw_torch_8bit # Options: "paged_ademamix_8bit", "adamw_bnb_8bit", "paged_adamw_8bit"
train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false
special_tokens:
pad_token: <|reserved_special_token_2|>
gradient_checkpointing: offload
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
s2_attention:
This model is a fine-tuned version of shb777/Llama-3.3-8B-Instruct-128K on the WokeAI/polititune-tankie-warmup dataset.
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
Base model
allura-forge/Llama-3.3-8B-Instruct