Text Generation
Transformers
Safetensors
qwen3_5_text
continual-learning
sft
affective-state-identification
multilingual
conversational
Instructions to use alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron") model = AutoModelForCausalLM.from_pretrained("alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron", 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 alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron
- SGLang
How to use alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron 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 "alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron" \ --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": "alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron", "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 "alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron" \ --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": "alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron with Docker Model Runner:
docker model run hf.co/alexjerpelea/Qwen3.5-4B-en-es-fa-hi-ron
add model card with results matrix + training details
Browse files
README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
base_model: Qwen/Qwen3.5-4B
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
- es
|
| 8 |
+
- fa
|
| 9 |
+
- hi
|
| 10 |
+
- ro
|
| 11 |
+
tags:
|
| 12 |
+
- continual-learning
|
| 13 |
+
- sft
|
| 14 |
+
- affective-state-identification
|
| 15 |
+
- multilingual
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# Qwen3.5-4B day-by-day multilingual SFT (en -> es -> fa -> hi -> ro)
|
| 19 |
+
|
| 20 |
+
Qwen3.5-4B fine-tuned sequentially on 5 languages for a continual-learning
|
| 21 |
+
"day in the life" experiment. Each language trained for one "day"
|
| 22 |
+
(3 epochs, 1000 train rows), starting from the previous day's checkpoint.
|
| 23 |
+
This checkpoint is the end of day 5 (Romanian) - the model has seen all
|
| 24 |
+
5 languages in order.
|
| 25 |
+
|
| 26 |
+
**Task:** Fill [MASK] tokens in an "I feel ..." sentence with the
|
| 27 |
+
corresponding affective state expression(s).
|
| 28 |
+
|
| 29 |
+
## Results - set_acc@1 on held-out test sets (1000 rows/lang)
|
| 30 |
+
|
| 31 |
+
```
|
| 32 |
+
test_en test_es test_fa test_hi test_ro
|
| 33 |
+
day1 (en) 0.187* 0.149 0.114 0.117 0.121
|
| 34 |
+
day2 (->es) 0.192 0.267* 0.112 0.088 0.090
|
| 35 |
+
day3 (->fa) 0.166 0.231 0.445* 0.068 0.111
|
| 36 |
+
day4 (->hi) 0.157 0.234 0.315 0.571* 0.174
|
| 37 |
+
day5 (->ro) 0.144 0.167 0.358 0.533 0.443*
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
`*` = just-trained language. This checkpoint corresponds to the final row.
|
| 41 |
+
|
| 42 |
+
## Training details
|
| 43 |
+
|
| 44 |
+
- Base: `Qwen/Qwen3.5-4B`
|
| 45 |
+
- Order: en -> es -> fa -> hi -> ro (one language per day)
|
| 46 |
+
- Per day: 3 epochs, effective bs 4 (per_device=1, grad_accum=4)
|
| 47 |
+
- LR 1e-5, cosine, warmup 0.03, bf16, sdpa attention, gradient checkpointing
|
| 48 |
+
- Single A100-40GB SXM
|
| 49 |
+
|
| 50 |
+
## Code and full run log
|
| 51 |
+
|
| 52 |
+
https://github.com/Continual-Learning-Emotion-Group/Romanian_ASI/tree/day-by-day
|
| 53 |
+
See `pipeline/train/RUN_LOG_DAY_BY_DAY.md`.
|