Instructions to use bboeun/trainer_output with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use bboeun/trainer_output with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("ainize/klue-bert-base-mrc") model = PeftModel.from_pretrained(base_model, "bboeun/trainer_output") - Transformers
How to use bboeun/trainer_output with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bboeun/trainer_output")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bboeun/trainer_output", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bboeun/trainer_output with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bboeun/trainer_output" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bboeun/trainer_output", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bboeun/trainer_output
- SGLang
How to use bboeun/trainer_output 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 "bboeun/trainer_output" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bboeun/trainer_output", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "bboeun/trainer_output" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bboeun/trainer_output", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bboeun/trainer_output with Docker Model Runner:
docker model run hf.co/bboeun/trainer_output
bboeun/klue-bert-base-mrc-ko
Browse files- adapter_config.json +2 -2
- adapter_model.safetensors +1 -1
- tokenizer.json +16 -2
- training_args.bin +1 -1
adapter_config.json
CHANGED
|
@@ -26,8 +26,8 @@
|
|
| 26 |
"revision": null,
|
| 27 |
"target_modules": [
|
| 28 |
"attention.self.key",
|
| 29 |
-
"attention.self.
|
| 30 |
-
"attention.self.
|
| 31 |
],
|
| 32 |
"task_type": "CAUSAL_LM",
|
| 33 |
"trainable_token_indices": null,
|
|
|
|
| 26 |
"revision": null,
|
| 27 |
"target_modules": [
|
| 28 |
"attention.self.key",
|
| 29 |
+
"attention.self.query",
|
| 30 |
+
"attention.self.value"
|
| 31 |
],
|
| 32 |
"task_type": "CAUSAL_LM",
|
| 33 |
"trainable_token_indices": null,
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3549056
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d6fd5909ef1b7ac9ec3545a0a4d6d4027e59f45c3d771a15d9490604618dffd
|
| 3 |
size 3549056
|
tokenizer.json
CHANGED
|
@@ -1,7 +1,21 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
| 7 |
"id": 0,
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": {
|
| 4 |
+
"direction": "Right",
|
| 5 |
+
"max_length": 512,
|
| 6 |
+
"strategy": "LongestFirst",
|
| 7 |
+
"stride": 0
|
| 8 |
+
},
|
| 9 |
+
"padding": {
|
| 10 |
+
"strategy": {
|
| 11 |
+
"Fixed": 512
|
| 12 |
+
},
|
| 13 |
+
"direction": "Right",
|
| 14 |
+
"pad_to_multiple_of": null,
|
| 15 |
+
"pad_id": 0,
|
| 16 |
+
"pad_type_id": 0,
|
| 17 |
+
"pad_token": "[PAD]"
|
| 18 |
+
},
|
| 19 |
"added_tokens": [
|
| 20 |
{
|
| 21 |
"id": 0,
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5713
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e8f99e66592be41a943e09eb276abe2aaf36b2796c2855933dc26304a6cd83a
|
| 3 |
size 5713
|