Text Generation
PEFT
TensorBoard
Safetensors
Transformers
qwen3
axolotl
lora
conversational
text-generation-inference
Instructions to use TeamPV/qwen1p7-qa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use TeamPV/qwen1p7-qa with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-1.7B") model = PeftModel.from_pretrained(base_model, "TeamPV/qwen1p7-qa") - Transformers
How to use TeamPV/qwen1p7-qa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TeamPV/qwen1p7-qa") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TeamPV/qwen1p7-qa") model = AutoModelForCausalLM.from_pretrained("TeamPV/qwen1p7-qa", device_map="auto") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TeamPV/qwen1p7-qa with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TeamPV/qwen1p7-qa" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TeamPV/qwen1p7-qa", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TeamPV/qwen1p7-qa
- SGLang
How to use TeamPV/qwen1p7-qa with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "TeamPV/qwen1p7-qa" \ --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": "TeamPV/qwen1p7-qa", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
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 "TeamPV/qwen1p7-qa" \ --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": "TeamPV/qwen1p7-qa", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TeamPV/qwen1p7-qa with Docker Model Runner:
docker model run hf.co/TeamPV/qwen1p7-qa
| library_name: peft | |
| license: apache-2.0 | |
| base_model: Qwen/Qwen3-1.7B | |
| tags: | |
| - axolotl | |
| - base_model:adapter:Qwen/Qwen3-1.7B | |
| - lora | |
| - transformers | |
| datasets: | |
| - TeamPV/sharegpt-mistral-onr | |
| pipeline_tag: text-generation | |
| model-index: | |
| - name: mistral-nemo-onr-dora-1p7 | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| [<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/axolotl-ai-cloud/axolotl) | |
| <details><summary>See axolotl config</summary> | |
| axolotl version: `0.13.0.dev0` | |
| ```yaml | |
| base_model: Qwen/Qwen3-1.7B | |
| # Quantization | |
| bnb_config_kwargs: | |
| bnb_4bit_compute_dtype: bfloat16 | |
| bnb_4bit_quant_type: nf4 | |
| bnb_4bit_use_double_quant: true | |
| datasets: | |
| - path: TeamPV/sharegpt-mistral-onr | |
| split: train | |
| type: chat_template | |
| conversation: messages # Your dataset has 'messages' field | |
| ds_type: json | |
| # Use model's built-in chat template | |
| val_set_size: 0.0 | |
| test_datasets: | |
| - path: TeamPV/sharegpt-mistral-onr | |
| split: validation | |
| type: chat_template | |
| conversation: messages | |
| eval_sample_packing: false | |
| eval_batch_size: 6 | |
| eval_steps: 30000 | |
| early_stopping_patience: 3 | |
| # Tokenization | |
| chat_template: tokenizer_default | |
| sequence_len: 1200 | |
| pad_to_sequence_len: true | |
| sample_packing: false | |
| special_tokens: | |
| pad_token: "</s>" | |
| # LoRA/DoRA | |
| adapter: lora | |
| lora_r: 32 | |
| lora_alpha: 64 | |
| lora_dropout: 0.05 | |
| lora_target_modules: | |
| - q_proj | |
| - k_proj | |
| - v_proj | |
| - o_proj | |
| - up_proj | |
| - down_proj | |
| - gate_proj | |
| peft_use_dora: false | |
| output_dir: /output/qwen1p7 | |
| use_tensorboard: true | |
| # Training | |
| micro_batch_size: 5 | |
| gradient_accumulation_steps: 1 | |
| num_epochs: 4 | |
| learning_rate: 0.00005 | |
| lr_scheduler: cosine | |
| warmup_ratio: 0.10 | |
| # Optimizer | |
| # optimizer: adamw_torch_fused | |
| optimizer: adamw_bnb_8bit | |
| bf16: true | |
| fp16: false | |
| # tf32: true | |
| # Attention | |
| flash_attention: true | |
| # Memory | |
| gradient_checkpointing: true | |
| gradient_checkpointing_kwargs: | |
| use_reentrant: false | |
| # Checkpointing | |
| save_steps: 30000 | |
| save_total_limit: 2 | |
| load_best_model_at_end: true | |
| # Logging | |
| logging_steps: 50 | |
| # HuggingFace Hub upload | |
| hub_model_id: TeamPV/mistral-nemo-onr-dora-1p7 # Your HF repo name | |
| hub_strategy: end # Options: end, every_save, checkpoint, all_checkpoints | |
| hf_use_auth_token: true | |
| # Optional: make repo private | |
| ``` | |
| </details><br> | |
| # mistral-nemo-onr-dora-1p7 | |
| This model is a fine-tuned version of [Qwen/Qwen3-1.7B](https://huggingface.co/Qwen/Qwen3-1.7B) on the TeamPV/sharegpt-mistral-onr dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 1.0987 | |
| - Memory/max Active (gib): 14.15 | |
| - Memory/max Allocated (gib): 14.15 | |
| - Memory/device Reserved (gib): 14.87 | |
| ## 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: 5e-05 | |
| - train_batch_size: 5 | |
| - eval_batch_size: 6 | |
| - seed: 42 | |
| - optimizer: Use OptimizerNames.ADAMW_BNB 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: 7353 | |
| - training_steps: 73530 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Active (gib) | Allocated (gib) | Reserved (gib) | | |
| |:-------------:|:------:|:-----:|:---------------:|:------------:|:---------------:|:--------------:| | |
| | No log | 0 | 0 | 3.6536 | 14.08 | 14.08 | 14.15 | | |
| | 1.0537 | 1.6319 | 30000 | 1.1174 | 14.15 | 14.15 | 14.85 | | |
| | 0.9286 | 3.2639 | 60000 | 1.0987 | 14.15 | 14.15 | 14.87 | | |
| ### Framework versions | |
| - PEFT 0.17.1 | |
| - Transformers 4.57.0 | |
| - Pytorch 2.7.1+cu126 | |
| - Datasets 4.0.0 | |
| - Tokenizers 0.22.1 |