Text Generation
Transformers
Safetensors
qwen3
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use formalmathatepfl/qwen3-cpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use formalmathatepfl/qwen3-cpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="formalmathatepfl/qwen3-cpt") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("formalmathatepfl/qwen3-cpt") model = AutoModelForCausalLM.from_pretrained("formalmathatepfl/qwen3-cpt", 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 formalmathatepfl/qwen3-cpt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "formalmathatepfl/qwen3-cpt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "formalmathatepfl/qwen3-cpt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/formalmathatepfl/qwen3-cpt
- SGLang
How to use formalmathatepfl/qwen3-cpt 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 "formalmathatepfl/qwen3-cpt" \ --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": "formalmathatepfl/qwen3-cpt", "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 "formalmathatepfl/qwen3-cpt" \ --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": "formalmathatepfl/qwen3-cpt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use formalmathatepfl/qwen3-cpt with Docker Model Runner:
docker model run hf.co/formalmathatepfl/qwen3-cpt
Qwen3-8B-cpt
This model is a fine-tuned version of Qwen/Qwen3-8B-Base on the cpt_data dataset. It achieves the following results on the evaluation set:
- Loss: 0.7642
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: 3e-06
- train_batch_size: 2
- eval_batch_size: 2
- seed: 42
- distributed_type: multi-GPU
- num_devices: 8
- total_train_batch_size: 16
- total_eval_batch_size: 16
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.03
- num_epochs: 2.0
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.1321 | 0.0594 | 100 | 1.0979 |
| 1.0204 | 0.1188 | 200 | 1.0132 |
| 1.0155 | 0.1781 | 300 | 0.9683 |
| 0.9392 | 0.2375 | 400 | 0.9368 |
| 0.8472 | 0.2969 | 500 | 0.9136 |
| 0.9268 | 0.3563 | 600 | 0.8942 |
| 0.8568 | 0.4157 | 700 | 0.8777 |
| 0.9049 | 0.4751 | 800 | 0.8637 |
| 0.8401 | 0.5344 | 900 | 0.8517 |
| 0.8449 | 0.5938 | 1000 | 0.8408 |
| 0.8638 | 0.6532 | 1100 | 0.8310 |
| 0.8485 | 0.7126 | 1200 | 0.8226 |
| 0.8273 | 0.7720 | 1300 | 0.8150 |
| 0.8165 | 0.8314 | 1400 | 0.8077 |
| 0.824 | 0.8907 | 1500 | 0.8014 |
| 0.7944 | 0.9501 | 1600 | 0.7957 |
| 0.7492 | 1.0095 | 1700 | 0.7912 |
| 0.754 | 1.0689 | 1800 | 0.7873 |
| 0.7184 | 1.1283 | 1900 | 0.7835 |
| 0.7298 | 1.1876 | 2000 | 0.7802 |
| 0.7093 | 1.2470 | 2100 | 0.7777 |
| 0.7624 | 1.3064 | 2200 | 0.7744 |
| 0.7419 | 1.3658 | 2300 | 0.7723 |
| 0.7439 | 1.4252 | 2400 | 0.7704 |
| 0.7064 | 1.4846 | 2500 | 0.7688 |
| 0.7387 | 1.5439 | 2600 | 0.7675 |
| 0.7527 | 1.6033 | 2700 | 0.7664 |
| 0.7359 | 1.6627 | 2800 | 0.7656 |
| 0.7167 | 1.7221 | 2900 | 0.7650 |
| 0.7159 | 1.7815 | 3000 | 0.7646 |
| 0.7399 | 1.8409 | 3100 | 0.7644 |
| 0.6995 | 1.9002 | 3200 | 0.7642 |
| 0.7915 | 1.9596 | 3300 | 0.7642 |
Framework versions
- Transformers 4.57.6
- Pytorch 2.9.0+cu128
- Datasets 4.0.0
- Tokenizers 0.22.2
- Downloads last month
- 1,295