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
|
@@ -74,16 +74,16 @@ The following hyperparameters were used during training:
|
|
| 74 |
|--------:|----------------:|------------------:|
|
| 75 |
| 0.08 | 0.3363 | 0.2766 |
|
| 76 |
| 0.15 | 0.2938 | 0.2719 |
|
| 77 |
-
| 0.23 | 0.
|
| 78 |
-
| 0.31 | 0.
|
| 79 |
| 0.38 | 0.2692 | 0.2640 |
|
| 80 |
| 0.46 | 0.2611 | 0.2571 |
|
| 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.2091 | 0.2340 |
|
| 88 |
- **Final validation accuracy:** ~92.0%
|
| 89 |
### Framework versions
|
|
|
|
| 74 |
|--------:|----------------:|------------------:|
|
| 75 |
| 0.08 | 0.3363 | 0.2766 |
|
| 76 |
| 0.15 | 0.2938 | 0.2719 |
|
| 77 |
+
| 0.23 | 0.2817 | 0.2751 |
|
| 78 |
+
| 0.31 | 0.2688 | 0.2604 |
|
| 79 |
| 0.38 | 0.2692 | 0.2640 |
|
| 80 |
| 0.46 | 0.2611 | 0.2571 |
|
| 81 |
+
| 0.54 | 0.2431 | 0.2433 |
|
| 82 |
+
| 0.61 | 0.2495 | 0.2439 |
|
| 83 |
+
| 0.69 | 0.2489 | 0.2384 |
|
| 84 |
+
| 0.77 | 0.2321 | 0.2376 |
|
| 85 |
+
| 0.84 | 0.2363 | 0.2353 |
|
| 86 |
+
| 0.92 | 0.2106 | 0.2358 |
|
| 87 |
| 0.99 | 0.2091 | 0.2340 |
|
| 88 |
- **Final validation accuracy:** ~92.0%
|
| 89 |
### Framework versions
|