Instructions to use ptkag1712/rapp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ptkag1712/rapp with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3-4B-Base") model = PeftModel.from_pretrained(base_model, "ptkag1712/rapp") - Transformers
How to use ptkag1712/rapp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ptkag1712/rapp") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ptkag1712/rapp", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ptkag1712/rapp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ptkag1712/rapp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ptkag1712/rapp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ptkag1712/rapp
- SGLang
How to use ptkag1712/rapp 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 "ptkag1712/rapp" \ --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": "ptkag1712/rapp", "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 "ptkag1712/rapp" \ --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": "ptkag1712/rapp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use ptkag1712/rapp with Docker Model Runner:
docker model run hf.co/ptkag1712/rapp
Upload folder using huggingface_hub
Browse files- adapter_config.json +5 -5
- adapter_model.safetensors +1 -1
- chat_template.jinja +1 -1
- tokenizer.json +2 -2
adapter_config.json
CHANGED
|
@@ -33,13 +33,13 @@
|
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
| 36 |
-
"
|
| 37 |
-
"
|
| 38 |
"k_proj",
|
| 39 |
"o_proj",
|
| 40 |
-
"
|
| 41 |
-
"
|
| 42 |
-
"
|
| 43 |
],
|
| 44 |
"target_parameters": null,
|
| 45 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 33 |
"rank_pattern": {},
|
| 34 |
"revision": null,
|
| 35 |
"target_modules": [
|
| 36 |
+
"v_proj",
|
| 37 |
+
"gate_proj",
|
| 38 |
"k_proj",
|
| 39 |
"o_proj",
|
| 40 |
+
"up_proj",
|
| 41 |
+
"q_proj",
|
| 42 |
+
"down_proj"
|
| 43 |
],
|
| 44 |
"target_parameters": null,
|
| 45 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 264308896
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e779f1aad484ffce7cd4311110fa84d23caf80621cc04de1a5d69f2e6757f735
|
| 3 |
size 264308896
|
chat_template.jinja
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{% if messages[0]['role'] == 'system' %}{{ messages[0]['content'] + eos_token }}{% set loop_messages = messages[1:] %}{% else %}{{ 'You are an AI assistant that analyzes text to choose suitable actions.
|
| 2 |
Given an input text, think step-by-step to identify which actions is needed to protect user information in given text.
|
| 3 |
Provide your reasoning process within <start_working_out> and <end_working_out>.
|
| 4 |
-
Then, provide the appropriate
|
|
|
|
| 1 |
{% if messages[0]['role'] == 'system' %}{{ messages[0]['content'] + eos_token }}{% set loop_messages = messages[1:] %}{% else %}{{ 'You are an AI assistant that analyzes text to choose suitable actions.
|
| 2 |
Given an input text, think step-by-step to identify which actions is needed to protect user information in given text.
|
| 3 |
Provide your reasoning process within <start_working_out> and <end_working_out>.
|
| 4 |
+
Then, provide the appropriate one or multiple actions (divide by commas) to protect given text (e.g., masking, generalizing, shuffling, no action needed) within <SOLUTION></SOLUTION>.' + eos_token }}{% set loop_messages = messages %}{% endif %}{% for message in loop_messages %}{% if message['role'] == 'user' %}{{ message['content'] }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<start_working_out>' }}{% endif %}
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:10ba4ba91270b1a50e5cd8e51023bccc66fc4ac4909dd7ae7ab29433411c9bb9
|
| 3 |
+
size 11422844
|