Abner0803/nq_text-with_pseudo_query-100k-gr
Preview • Updated • 25
How to use theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM
tokenizer = AutoTokenizer.from_pretrained("theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs")
model = AutoModelForMultimodalLM.from_pretrained("theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs")
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 theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs
How to use theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs" \
--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": "theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs",
"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 "theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs" \
--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": "theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs with Docker Model Runner:
docker model run hf.co/theblackcat102/Qwen3-1.7B-nq-baseline-finetune-5epochs
axolotl version: 0.10.0
base_model: Abner0803/Qwen3-1.7B-nq-text-100k-with_pseudo_queries
datasets:
- path: Abner0803/nq_text-with_pseudo_query-100k-gr
data_files: data/icl_test.jsonl
type: chat_template
chat_template: tokenizer_default_fallback_chatml
field_messages: conversations
message_property_mappings:
role: role
content: content
roles:
assistant:
- assistant
- gpt
- model
user:
- user
- human
system:
- system
roles_to_train: ["assistant"]
train_on_eos: "turn"
dataset_processes: 6
streaming: false
shuffle_merged_datasets: true
output_dir: /home/theblackcat/ICLGR/checkpoints/Qwen3-1.7B-nq-baseline-finetune-5epochs
sequence_len: 2048
sample_packing: false
flash_attention: false
xformers_attention: false
flex_attention: false
sdp_attention: true
overrides_of_model_config:
_attn_implementation: "sdpa"
gradient_accumulation_steps: 128
micro_batch_size: 1
num_epochs: 5
optimizer: adamw_torch
lr_scheduler: cosine
learning_rate: 0.0001
warmup_ratio: 0.1
weight_decay: 0.0
bf16: true
tf32: false
gradient_checkpointing: true
logging_steps: 50
save_strategy: steps
save_steps: 100
save_total_limit: 3
special_tokens:
eos_token: "<|im_end|>"
val_set_size: 0.0
wandb_project: ICLGR-NQ
wandb_entity: abnerden0803-national-taiwan-university
wandb_watch:
wandb_name: qwen3-1.7b-nq-baseline-direct-finetune-5epochs
wandb_log_model:
This model is a fine-tuned version of Abner0803/Qwen3-1.7B-nq-text-100k-with_pseudo_queries on the Abner0803/nq_text-with_pseudo_query-100k-gr dataset.
More information needed
More information needed
More information needed
The following hyperparameters were used during training: