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
Qwen3.5-4B day-by-day multilingual SFT (en -> es -> fa -> hi -> ro)
Qwen3.5-4B fine-tuned sequentially on 5 languages for a continual-learning "day in the life" experiment. Each language trained for one "day" (3 epochs, 1000 train rows), starting from the previous day's checkpoint. This checkpoint is the end of day 5 (Romanian) - the model has seen all 5 languages in order.
Task: Fill [MASK] tokens in an "I feel ..." sentence with the corresponding affective state expression(s).
Results - set_acc@1 on held-out test sets (1000 rows/lang)
test_en test_es test_fa test_hi test_ro
day1 (en) 0.187* 0.149 0.114 0.117 0.121
day2 (->es) 0.192 0.267* 0.112 0.088 0.090
day3 (->fa) 0.166 0.231 0.445* 0.068 0.111
day4 (->hi) 0.157 0.234 0.315 0.571* 0.174
day5 (->ro) 0.144 0.167 0.358 0.533 0.443*
* = just-trained language. This checkpoint corresponds to the final row.
Training details
- Base:
Qwen/Qwen3.5-4B - Order: en -> es -> fa -> hi -> ro (one language per day)
- Per day: 3 epochs, effective bs 4 (per_device=1, grad_accum=4)
- LR 1e-5, cosine, warmup 0.03, bf16, sdpa attention, gradient checkpointing
- Single A100-40GB SXM
Code and full run log
https://github.com/Continual-Learning-Emotion-Group/Romanian_ASI/tree/day-by-day
See pipeline/train/RUN_LOG_DAY_BY_DAY.md.
- Downloads last month
- 14