Text Generation
Transformers
Safetensors
qwen3
Generated from Trainer
conversational
text-generation-inference
Instructions to use timarni/MNLP_M2_mcqa_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use timarni/MNLP_M2_mcqa_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="timarni/MNLP_M2_mcqa_model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("timarni/MNLP_M2_mcqa_model") model = AutoModelForCausalLM.from_pretrained("timarni/MNLP_M2_mcqa_model", 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 timarni/MNLP_M2_mcqa_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "timarni/MNLP_M2_mcqa_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "timarni/MNLP_M2_mcqa_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/timarni/MNLP_M2_mcqa_model
- SGLang
How to use timarni/MNLP_M2_mcqa_model 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 "timarni/MNLP_M2_mcqa_model" \ --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": "timarni/MNLP_M2_mcqa_model", "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 "timarni/MNLP_M2_mcqa_model" \ --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": "timarni/MNLP_M2_mcqa_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use timarni/MNLP_M2_mcqa_model with Docker Model Runner:
docker model run hf.co/timarni/MNLP_M2_mcqa_model
| library_name: transformers | |
| license: apache-2.0 | |
| base_model: Qwen/Qwen3-0.6B-Base | |
| tags: | |
| - generated_from_trainer | |
| datasets: | |
| - timarni/mmlu-stem-alpaca | |
| model-index: | |
| - name: outputs/qwen3_mmlu_alpaca_lr_5e-5 | |
| 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.9.2` | |
| ```yaml | |
| base_model: Qwen/Qwen3-0.6B-Base | |
| # Automatically upload checkpoint and final model to HF | |
| # hub_model_id: username/custom_model_name | |
| plugins: | |
| - axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin | |
| strict: false | |
| chat_template: qwen3 | |
| datasets: | |
| - path: timarni/mmlu-stem-alpaca | |
| type: alpaca | |
| split: train | |
| val_set_size: 0.15 | |
| output_dir: ./outputs/qwen3_mmlu_alpaca_lr_5e-5 | |
| dataset_prepared_path: last_run_prepared | |
| sequence_len: 4096 #2048 | |
| sample_packing: true | |
| eval_sample_packing: true | |
| pad_to_sequence_len: true | |
| wandb_project: mnlp_project | |
| wandb_entity: tim-arni | |
| wandb_watch: | |
| wandb_name: qwen3-0.6B-mmlu_alpaca_style_lr_5e-5 | |
| wandb_log_model: | |
| gradient_accumulation_steps: 2 | |
| micro_batch_size: 1 | |
| num_epochs: 5 | |
| optimizer: adamw_torch | |
| lr_scheduler: cosine | |
| learning_rate: 0.00005 # 0.0002 | |
| bf16: auto | |
| tf32: true | |
| gradient_checkpointing: offload | |
| gradient_checkpointing_kwargs: | |
| use_reentrant: false | |
| resume_from_checkpoint: | |
| logging_steps: 1 | |
| flash_attention: true | |
| warmup_steps: 10 | |
| evals_per_epoch: 4 | |
| saves_per_epoch: 1 | |
| weight_decay: 0.0 | |
| special_tokens: | |
| ``` | |
| </details><br> | |
| # outputs/qwen3_mmlu_alpaca_lr_5e-5 | |
| This model is a fine-tuned version of [Qwen/Qwen3-0.6B-Base](https://huggingface.co/Qwen/Qwen3-0.6B-Base) on the timarni/mmlu-stem-alpaca dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.2293 | |
| ## 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: 1 | |
| - eval_batch_size: 1 | |
| - seed: 42 | |
| - distributed_type: multi-GPU | |
| - num_devices: 2 | |
| - gradient_accumulation_steps: 2 | |
| - total_train_batch_size: 4 | |
| - total_eval_batch_size: 2 | |
| - optimizer: Use adamw_torch 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: 10 | |
| - num_epochs: 5.0 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | | |
| |:-------------:|:------:|:----:|:---------------:| | |
| | 0.5211 | 0.0952 | 1 | 0.5254 | | |
| | 0.3878 | 0.2857 | 3 | 0.2026 | | |
| | 0.0918 | 0.5714 | 6 | 0.1485 | | |
| | 0.108 | 0.8571 | 9 | 0.1240 | | |
| | 0.116 | 1.0952 | 12 | 0.1226 | | |
| | 0.0992 | 1.3810 | 15 | 0.1217 | | |
| | 0.0803 | 1.6667 | 18 | 0.2010 | | |
| | 0.0557 | 1.9524 | 21 | 0.1384 | | |
| | 0.0627 | 2.1905 | 24 | 0.1467 | | |
| | 0.0315 | 2.4762 | 27 | 0.1556 | | |
| | 0.0454 | 2.7619 | 30 | 0.2070 | | |
| | 0.0118 | 3.0 | 33 | 0.2289 | | |
| | 0.0461 | 3.2857 | 36 | 0.2317 | | |
| | 0.0082 | 3.5714 | 39 | 0.2292 | | |
| | 0.029 | 3.8571 | 42 | 0.2290 | | |
| | 0.0138 | 4.0952 | 45 | 0.2299 | | |
| | 0.0178 | 4.3810 | 48 | 0.2293 | | |
| ### Framework versions | |
| - Transformers 4.51.3 | |
| - Pytorch 2.5.1+cu121 | |
| - Datasets 3.5.1 | |
| - Tokenizers 0.21.1 | |