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 160
Browse files- adapter_model.safetensors +1 -1
- trainer_log.jsonl +8 -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:4d364eb38a8be050b253d95fb9bb96a3cca85c934f5694fdf28af039b0f831af
|
| 3 |
size 140815952
|
trainer_log.jsonl
CHANGED
|
@@ -23,3 +23,11 @@
|
|
| 23 |
{"current_steps": 110, "total_steps": 225, "loss": 0.4784, "lr": 0.0003077940805287425, "epoch": 1.4666666666666668, "percentage": 48.89, "elapsed_time": "0:58:34", "remaining_time": "1:01:14"}
|
| 24 |
{"current_steps": 115, "total_steps": 225, "loss": 0.4422, "lr": 0.00028872454505352117, "epoch": 1.5333333333333332, "percentage": 51.11, "elapsed_time": "1:01:13", "remaining_time": "0:58:33"}
|
| 25 |
{"current_steps": 120, "total_steps": 225, "loss": 0.4828, "lr": 0.0002694209618222516, "epoch": 1.6, "percentage": 53.33, "elapsed_time": "1:03:51", "remaining_time": "0:55:52"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
{"current_steps": 110, "total_steps": 225, "loss": 0.4784, "lr": 0.0003077940805287425, "epoch": 1.4666666666666668, "percentage": 48.89, "elapsed_time": "0:58:34", "remaining_time": "1:01:14"}
|
| 24 |
{"current_steps": 115, "total_steps": 225, "loss": 0.4422, "lr": 0.00028872454505352117, "epoch": 1.5333333333333332, "percentage": 51.11, "elapsed_time": "1:01:13", "remaining_time": "0:58:33"}
|
| 25 |
{"current_steps": 120, "total_steps": 225, "loss": 0.4828, "lr": 0.0002694209618222516, "epoch": 1.6, "percentage": 53.33, "elapsed_time": "1:03:51", "remaining_time": "0:55:52"}
|
| 26 |
+
{"current_steps": 125, "total_steps": 225, "loss": 0.4853, "lr": 0.00025, "epoch": 1.6666666666666665, "percentage": 55.56, "elapsed_time": "1:06:42", "remaining_time": "0:53:21"}
|
| 27 |
+
{"current_steps": 130, "total_steps": 225, "loss": 0.4392, "lr": 0.00023057903817774841, "epoch": 1.7333333333333334, "percentage": 57.78, "elapsed_time": "1:09:21", "remaining_time": "0:50:40"}
|
| 28 |
+
{"current_steps": 135, "total_steps": 225, "loss": 0.4489, "lr": 0.00021127545494647882, "epoch": 1.8, "percentage": 60.0, "elapsed_time": "1:11:59", "remaining_time": "0:47:59"}
|
| 29 |
+
{"current_steps": 140, "total_steps": 225, "loss": 0.4856, "lr": 0.00019220591947125766, "epoch": 1.8666666666666667, "percentage": 62.22, "elapsed_time": "1:14:37", "remaining_time": "0:45:18"}
|
| 30 |
+
{"current_steps": 145, "total_steps": 225, "loss": 0.4406, "lr": 0.0001734856863530282, "epoch": 1.9333333333333333, "percentage": 64.44, "elapsed_time": "1:17:15", "remaining_time": "0:42:37"}
|
| 31 |
+
{"current_steps": 150, "total_steps": 225, "loss": 0.4405, "lr": 0.0001552278990399052, "epoch": 2.0, "percentage": 66.67, "elapsed_time": "1:19:53", "remaining_time": "0:39:56"}
|
| 32 |
+
{"current_steps": 155, "total_steps": 225, "loss": 0.3784, "lr": 0.00013754290599809105, "epoch": 2.066666666666667, "percentage": 68.89, "elapsed_time": "1:22:32", "remaining_time": "0:37:16"}
|
| 33 |
+
{"current_steps": 160, "total_steps": 225, "loss": 0.4102, "lr": 0.00012053759377541865, "epoch": 2.1333333333333333, "percentage": 71.11, "elapsed_time": "1:25:10", "remaining_time": "0:34:36"}
|