Text Generation
Transformers
Safetensors
PEFT
llama
protein
ptm
adp-ribosylation
lora
conversational
text-generation-inference
Instructions to use jbenbudd/ADPrLlama with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jbenbudd/ADPrLlama with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jbenbudd/ADPrLlama", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jbenbudd/ADPrLlama") model = AutoModelForCausalLM.from_pretrained("jbenbudd/ADPrLlama", device_map="auto") 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]:])) - PEFT
How to use jbenbudd/ADPrLlama with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jbenbudd/ADPrLlama with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jbenbudd/ADPrLlama" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jbenbudd/ADPrLlama", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jbenbudd/ADPrLlama
- SGLang
How to use jbenbudd/ADPrLlama 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 "jbenbudd/ADPrLlama" \ --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": "jbenbudd/ADPrLlama", "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 "jbenbudd/ADPrLlama" \ --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": "jbenbudd/ADPrLlama", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jbenbudd/ADPrLlama with Docker Model Runner:
docker model run hf.co/jbenbudd/ADPrLlama
train_1_epoch_test
Browse files- chat_template.jinja +9 -0
- eval_results.json +6 -6
- model-00001-of-00004.safetensors +3 -0
- model-00002-of-00004.safetensors +3 -0
- model-00003-of-00004.safetensors +3 -0
- model-00004-of-00004.safetensors +3 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% set system_message = 'Below is an instruction that describes a task. Write a response that appropriately completes the request.
|
| 2 |
+
|
| 3 |
+
' %}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% endif %}{% if system_message is defined %}{{ system_message }}{% endif %}{% for message in loop_messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '### Instruction:
|
| 4 |
+
' + content + '
|
| 5 |
+
|
| 6 |
+
### Response:
|
| 7 |
+
' }}{% elif message['role'] == 'assistant' %}{{ content + '</s>' + '
|
| 8 |
+
|
| 9 |
+
' }}{% endif %}{% endfor %}
|
eval_results.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
-
"epoch":
|
| 3 |
-
"eval_loss": 0.
|
| 4 |
-
"eval_runtime": 32.
|
| 5 |
-
"eval_samples_per_second":
|
| 6 |
-
"eval_steps_per_second":
|
| 7 |
-
"num_input_tokens_seen":
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"epoch": 1.0,
|
| 3 |
+
"eval_loss": 0.37766581773757935,
|
| 4 |
+
"eval_runtime": 32.5859,
|
| 5 |
+
"eval_samples_per_second": 95.686,
|
| 6 |
+
"eval_steps_per_second": 5.984,
|
| 7 |
+
"num_input_tokens_seen": 2691984
|
| 8 |
}
|
model-00001-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac93bb2bf60fe1b555108254036387baaf9d2058b6155f18dda9847fb1f0d483
|
| 3 |
+
size 3972162976
|
model-00002-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87dc05b2db9b22e8902c5a89fe5da8401b08f5c28dde34ce115a12f089206d85
|
| 3 |
+
size 3980568496
|
model-00003-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:27d6d5a727b615edbfa354e75234856f83dcc72aaf07a0bdb8a2bcda893c0fa0
|
| 3 |
+
size 3957483336
|
model-00004-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1989962a739ac26c1bd8155f0750b7df2fd23f42089e459cfe965ddf6f05d3c8
|
| 3 |
+
size 1566649928
|