Instructions to use tokhey/question_generation_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use tokhey/question_generation_model with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "tokhey/question_generation_model") - Transformers
How to use tokhey/question_generation_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tokhey/question_generation_model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tokhey/question_generation_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tokhey/question_generation_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tokhey/question_generation_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": "tokhey/question_generation_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tokhey/question_generation_model
- SGLang
How to use tokhey/question_generation_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 "tokhey/question_generation_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": "tokhey/question_generation_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 "tokhey/question_generation_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": "tokhey/question_generation_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tokhey/question_generation_model with Docker Model Runner:
docker model run hf.co/tokhey/question_generation_model
Training in progress, step 225
Browse files- adapter_model.safetensors +1 -1
- trainer_log.jsonl +6 -0
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 140815952
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79cc0f0d4da8dc41e74774dbe3bfeab0c15fec40247cbabd3e59c325c765c7a5
|
| 3 |
size 140815952
|
trainer_log.jsonl
CHANGED
|
@@ -40,3 +40,9 @@
|
|
| 40 |
{"current_steps": 195, "total_steps": 225, "loss": 0.3846, "lr": 2.8497160132921336e-05, "epoch": 2.6, "percentage": 86.67, "elapsed_time": "1:43:50", "remaining_time": "0:15:58"}
|
| 41 |
{"current_steps": 200, "total_steps": 225, "loss": 0.3998, "lr": 2.0161740254440898e-05, "epoch": 2.6666666666666665, "percentage": 88.89, "elapsed_time": "1:46:28", "remaining_time": "0:13:18"}
|
| 42 |
{"current_steps": 200, "total_steps": 225, "eval_loss": 0.5051587224006653, "epoch": 2.6666666666666665, "percentage": 88.89, "elapsed_time": "1:47:13", "remaining_time": "0:13:24"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
{"current_steps": 195, "total_steps": 225, "loss": 0.3846, "lr": 2.8497160132921336e-05, "epoch": 2.6, "percentage": 86.67, "elapsed_time": "1:43:50", "remaining_time": "0:15:58"}
|
| 41 |
{"current_steps": 200, "total_steps": 225, "loss": 0.3998, "lr": 2.0161740254440898e-05, "epoch": 2.6666666666666665, "percentage": 88.89, "elapsed_time": "1:46:28", "remaining_time": "0:13:18"}
|
| 42 |
{"current_steps": 200, "total_steps": 225, "eval_loss": 0.5051587224006653, "epoch": 2.6666666666666665, "percentage": 88.89, "elapsed_time": "1:47:13", "remaining_time": "0:13:24"}
|
| 43 |
+
{"current_steps": 205, "total_steps": 225, "loss": 0.4098, "lr": 1.3215442672249972e-05, "epoch": 2.7333333333333334, "percentage": 91.11, "elapsed_time": "1:50:00", "remaining_time": "0:10:43"}
|
| 44 |
+
{"current_steps": 210, "total_steps": 225, "loss": 0.3316, "lr": 7.70025020008347e-06, "epoch": 2.8, "percentage": 93.33, "elapsed_time": "1:52:39", "remaining_time": "0:08:02"}
|
| 45 |
+
{"current_steps": 215, "total_steps": 225, "loss": 0.3406, "lr": 3.64949617782967e-06, "epoch": 2.8666666666666667, "percentage": 95.56, "elapsed_time": "1:55:18", "remaining_time": "0:05:21"}
|
| 46 |
+
{"current_steps": 220, "total_steps": 225, "loss": 0.3846, "lr": 1.0876630077453487e-06, "epoch": 2.9333333333333336, "percentage": 97.78, "elapsed_time": "1:57:56", "remaining_time": "0:02:40"}
|
| 47 |
+
{"current_steps": 225, "total_steps": 225, "loss": 0.3517, "lr": 3.023418496261865e-08, "epoch": 3.0, "percentage": 100.0, "elapsed_time": "2:00:35", "remaining_time": "0:00:00"}
|
| 48 |
+
{"current_steps": 225, "total_steps": 225, "epoch": 3.0, "percentage": 100.0, "elapsed_time": "2:00:43", "remaining_time": "0:00:00"}
|