Instructions to use 1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use 1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-2B") model = PeftModel.from_pretrained(base_model, "1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall") - Transformers
How to use 1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall
- SGLang
How to use 1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall 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 "1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall" \ --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": "1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall", "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 "1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall" \ --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": "1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall with Docker Model Runner:
docker model run hf.co/1jamesthompson1/Qwen3.5-2B-nz-wvs-single_modal-overall
Qwen3.5-2B LoRA — Single Modal, Overall
This model is a LoRA fine-tune of Qwen/Qwen3.5-2B as part of the AIML589 project.
This adapter is licensed under CC BY-SA 4.0.
Dataset
Fine-tuned on the single_modal config of the wvs-nz-value-alignment dataset, overall subpopulation.
Part of the wvs-nz-value-alignment collection.
GPU: NVIDIA RTX PRO 6000 Blackwell Workstation Edition · Training time: 1m 7s
Training hyperparameters
| Parameter | Value |
|---|---|
| LoRA rank | 16 |
| LoRA alpha | 32 |
| LoRA dropout | 0.05 |
| DoRA | False |
| Learning rate | 0.0002 |
| Batch size | 8 |
| Gradient accumulation | 4 |
| Epochs | 1 |
| Max seq length | 1024 |
| Warmup ratio | 0.1 |
| Dtype | bf16 |
Training log
{"loss": 1.6248851776123048, "grad_norm": 1.4257605075836182, "learning_rate": 0.00017058823529411766, "entropy": 1.579152311384678, "mean_token_accuracy": 0.6371947549283504, "num_tokens": 52078.0, "epoch": 0.26666666666666666, "step": 10}
{"loss": 0.4948576927185059, "grad_norm": 0.6731943488121033, "learning_rate": 0.00011176470588235294, "entropy": 0.5243682205677033, "mean_token_accuracy": 0.8807921424508095, "num_tokens": 104429.0, "epoch": 0.5333333333333333, "step": 20}
{"loss": 0.3364424228668213, "grad_norm": 0.7052034735679626, "learning_rate": 5.294117647058824e-05, "entropy": 0.34181889072060584, "mean_token_accuracy": 0.9150784552097321, "num_tokens": 156603.0, "epoch": 0.8, "step": 30}
{"train_runtime": 67.3283, "train_samples_per_second": 17.749, "train_steps_per_second": 0.564, "total_flos": 1992908272281216.0, "train_loss": 0.702773696497867, "entropy": 0.28197900851567587, "mean_token_accuracy": 0.9320357978343964, "num_tokens": 195384.0, "epoch": 1.0, "step": 38}
Environment
| Package | Version |
|---|---|
| torch | 2.13.0 |
| transformers | 5.14.1 |
| trl | 1.9.2 |
| datasets | 5.0.1 |
| accelerate | 1.14.0 |
| python-dotenv | 1.2.2 |
| peft | 0.20.0 |
| bitsandbytes | 0.50.0 |
| huggingface-hub | ? |
| jinja2 | ? |
| torchvision | 0.28.0 |
| pillow | 12.3.0 |
Intended use
This adapter is intended for research purposes only as part of the AIML589 project, which investigates value alignment of LLMs with New Zealand population distributions from the World Values Survey.
Out-of-scope
This model has not been safety-tuned for general-purpose deployment. It should not be used in production systems, for making decisions about people, or in contexts where reliability and safety are critical.
Limitations and biases
- Fine-tuned on a single WVS wave (Wave 7) for New Zealand only.
- The training data reflects the values of those who responded to the survey and may not represent all New Zealanders.
- LoRA adapters are subject to the limitations and biases of the base model (Qwen/Qwen3.5-2B).
- Downloads last month
- 66