Text Generation
Transformers
Safetensors
qwen3
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use youssefbelghmi/MNLP_M3_mcqa_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use youssefbelghmi/MNLP_M3_mcqa_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="youssefbelghmi/MNLP_M3_mcqa_model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("youssefbelghmi/MNLP_M3_mcqa_model") model = AutoModelForCausalLM.from_pretrained("youssefbelghmi/MNLP_M3_mcqa_model") 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
- vLLM
How to use youssefbelghmi/MNLP_M3_mcqa_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "youssefbelghmi/MNLP_M3_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": "youssefbelghmi/MNLP_M3_mcqa_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/youssefbelghmi/MNLP_M3_mcqa_model
- SGLang
How to use youssefbelghmi/MNLP_M3_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 "youssefbelghmi/MNLP_M3_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": "youssefbelghmi/MNLP_M3_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 "youssefbelghmi/MNLP_M3_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": "youssefbelghmi/MNLP_M3_mcqa_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use youssefbelghmi/MNLP_M3_mcqa_model with Docker Model Runner:
docker model run hf.co/youssefbelghmi/MNLP_M3_mcqa_model
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,9 +12,9 @@ licence: license
|
|
| 12 |
|
| 13 |
# MNLP M3 MCQA Model (Qwen3-0.6B fine-tuned)
|
| 14 |
|
| 15 |
-
This model is a fine-tuned version of [tocico28/MNLP_M3_dpo_model](https://huggingface.co/tocico28/MNLP_M3_dpo_model) on the [youssefbelghmi/MNLP_M3_mcqa_dataset](https://huggingface.co/datasets/youssefbelghmi/MNLP_M3_mcqa_dataset)
|
| 16 |
|
| 17 |
-
The [tocico28/MNLP_M3_dpo_model](https://huggingface.co/tocico28/MNLP_M3_dpo_model)
|
| 18 |
|
| 19 |
It has been trained using [TRL](https://github.com/huggingface/trl) as part of the final milestone of the **CS-552: Modern NLP** course at EPFL (Spring 2025).
|
| 20 |
|
|
@@ -72,19 +72,19 @@ The following hyperparameters were used during training:
|
|
| 72 |
## Training Results
|
| 73 |
| Epoch | Training Loss | Validation Loss |
|
| 74 |
|--------:|----------------:|------------------:|
|
| 75 |
-
| 0.08 | 0.
|
| 76 |
-
| 0.15 | 0.
|
| 77 |
-
| 0.23 | 0.
|
| 78 |
-
| 0.31 | 0.
|
| 79 |
-
| 0.38 | 0.
|
| 80 |
-
| 0.46 | 0.
|
| 81 |
-
| 0.54 | 0.
|
| 82 |
-
| 0.61 | 0.
|
| 83 |
-
| 0.69 | 0.
|
| 84 |
-
| 0.77 | 0.
|
| 85 |
-
| 0.84 | 0.
|
| 86 |
-
| 0.92 | 0.
|
| 87 |
-
| 0.99 | 0.
|
| 88 |
- **Final training loss:** 0.211
|
| 89 |
- **Final validation accuracy:** ~92.0%
|
| 90 |
### Framework versions
|
|
|
|
| 12 |
|
| 13 |
# MNLP M3 MCQA Model (Qwen3-0.6B fine-tuned)
|
| 14 |
|
| 15 |
+
This model is a fine-tuned version of [tocico28/MNLP_M3_dpo_model](https://huggingface.co/tocico28/MNLP_M3_dpo_model) on the [youssefbelghmi/MNLP_M3_mcqa_dataset](https://huggingface.co/datasets/youssefbelghmi/MNLP_M3_mcqa_dataset), a large-scale collection of multiple-choice questions designed for evaluating and training models in **STEM** domains (science, math, engineering, medicine, etc.).
|
| 16 |
|
| 17 |
+
The [tocico28/MNLP_M3_dpo_model](https://huggingface.co/tocico28/MNLP_M3_dpo_model) is itself a fine-tuned version of **Qwen/Qwen3-0.6B-Base** using a dataset of preference-labeled STEM response pairs collected through a collaborative classroom annotation effort.
|
| 18 |
|
| 19 |
It has been trained using [TRL](https://github.com/huggingface/trl) as part of the final milestone of the **CS-552: Modern NLP** course at EPFL (Spring 2025).
|
| 20 |
|
|
|
|
| 72 |
## Training Results
|
| 73 |
| Epoch | Training Loss | Validation Loss |
|
| 74 |
|--------:|----------------:|------------------:|
|
| 75 |
+
| 0.08 | 0.3363 | 0.2766 |
|
| 76 |
+
| 0.15 | 0.2938 | 0.2719 |
|
| 77 |
+
| 0.23 | 0.2431 | 0.2604 |
|
| 78 |
+
| 0.31 | 0.2688 | 0.2751 |
|
| 79 |
+
| 0.38 | 0.2817 | 0.2571 |
|
| 80 |
+
| 0.46 | 0.2106 | 0.2640 |
|
| 81 |
+
| 0.54 | 0.2692 | 0.2439 |
|
| 82 |
+
| 0.61 | 0.2321 | 0.2384 |
|
| 83 |
+
| 0.69 | 0.2091 | 0.2340 |
|
| 84 |
+
| 0.77 | 0.2495 | 0.2433 |
|
| 85 |
+
| 0.84 | 0.2489 | 0.2376 |
|
| 86 |
+
| 0.92 | 0.2363 | 0.2358 |
|
| 87 |
+
| 0.99 | 0.2611 | 0.2353 |
|
| 88 |
- **Final training loss:** 0.211
|
| 89 |
- **Final validation accuracy:** ~92.0%
|
| 90 |
### Framework versions
|