How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="felixwangg/Qwen2.5-Coder-7B-func-stage1-sec-stage2-4k")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM

tokenizer = AutoTokenizer.from_pretrained("felixwangg/Qwen2.5-Coder-7B-func-stage1-sec-stage2-4k")
model = AutoModelForMultimodalLM.from_pretrained("felixwangg/Qwen2.5-Coder-7B-func-stage1-sec-stage2-4k")
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]:]))
Quick Links

Built with Axolotl

See axolotl config

axolotl version: 0.16.1

base_model: Qwen/Qwen2.5-Coder-7B-Instruct
model_type: Qwen2ForCausalLM
tokenizer_type: AutoTokenizer

load_in_8bit: false
load_in_4bit: false

datasets:
  - path: felixwangg/prime_vul_plus_splitted
    type: chat_template
    split: train
test_datasets:
  - path: felixwangg/prime_vul_plus_splitted
    type: chat_template
    split: validation
dataset_prepared_path: /u901/t577wang/SecSteer-v2/axolotl-datasets/lora/Qwen2.5-Coder-7B/func-stage1-sec-stage2-4k
val_set_size: 0
output_dir: /u901/t577wang/SecSteer-v2/axolotl-outputs/lora/Qwen2.5-Coder-7B-func-stage1-sec-stage2-4k
sequence_len: 4096
sample_packing: false
eval_sample_packing: false
pad_to_sequence_len: true

adapter: lora
lora_model_dir: /u901/t577wang/SecSteer-v2/axolotl-outputs/lora/Qwen2.5-Coder-7B-func-stage1-4k/checkpoint-54
lora_r: 16
lora_alpha: 16
lora_dropout: 0.05
lora_target_linear: true
merge_lora: true

wandb_project: sft-primevul-sweep-ctx-0
wandb_entity: wtkuan
wandb_watch: "false"
wandb_name: Qwen2.5-Coder-7B-func-stage1-sec-stage2-4k
wandb_log_model: "false"


gradient_accumulation_steps: 8
micro_batch_size: 4
optimizer: adamw_torch
lr_scheduler: cosine
learning_rate: 4e-5

bf16: true
tf32: false

train_on_inputs: false
roles_to_train: ['assistant']

gradient_checkpointing: true
resume_from_checkpoint:
logging_steps: 1
flash_attention: true

num_epochs: 1
warmup_ratio: 0.1
early_stopping_patience: 1000
eval_steps: 15
save_steps: 15
save_total_limit: 1000
load_best_model_at_end: true

weight_decay: 0.02
special_tokens:

plugins:

u901/t577wang/SecSteer-v2/axolotl-outputs/lora/Qwen2.5-Coder-7B-func-stage1-sec-stage2-4k

This model is a fine-tuned version of Qwen/Qwen2.5-Coder-7B-Instruct on the felixwangg/prime_vul_plus_splitted dataset. It achieves the following results on the evaluation set:

  • Loss: 0.7125
  • Ppl: 2.0392
  • Memory/max Active (gib): 38.14
  • Memory/max Allocated (gib): 38.14
  • Memory/device Reserved (gib): 52.47

Model description

More information needed

Intended uses & limitations

More information needed

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 4e-05
  • train_batch_size: 4
  • eval_batch_size: 4
  • seed: 42
  • distributed_type: multi-GPU
  • num_devices: 2
  • gradient_accumulation_steps: 8
  • total_train_batch_size: 64
  • total_eval_batch_size: 8
  • optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
  • lr_scheduler_type: cosine
  • lr_scheduler_warmup_steps: 5
  • training_steps: 57

Training results

Training Loss Epoch Step Validation Loss Ppl Active (gib) Allocated (gib) Reserved (gib)
No log 0 0 0.7604 2.1391 37.83 37.83 41.81
0.7392 0.2661 15 0.7265 2.0679 38.14 38.14 51.31
0.7171 0.5322 30 0.7161 2.0465 38.14 38.14 52.47
0.6792 0.7982 45 0.7129 2.0399 38.14 38.14 52.47
0.7110 1.0 57 0.7125 2.0392 38.14 38.14 52.47

Framework versions

  • PEFT 0.19.1
  • Transformers 5.5.4
  • Pytorch 2.11.0+cu130
  • Datasets 4.5.0
  • Tokenizers 0.22.2
Downloads last month
1
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for felixwangg/Qwen2.5-Coder-7B-func-stage1-sec-stage2-4k

Base model

Qwen/Qwen2.5-7B
Adapter
(711)
this model

Dataset used to train felixwangg/Qwen2.5-Coder-7B-func-stage1-sec-stage2-4k