Instructions to use KVN03/Darnell with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KVN03/Darnell with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KVN03/Darnell") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KVN03/Darnell") model = AutoModelForCausalLM.from_pretrained("KVN03/Darnell", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KVN03/Darnell with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KVN03/Darnell" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KVN03/Darnell", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KVN03/Darnell
- SGLang
How to use KVN03/Darnell 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 "KVN03/Darnell" \ --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": "KVN03/Darnell", "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 "KVN03/Darnell" \ --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": "KVN03/Darnell", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KVN03/Darnell with Docker Model Runner:
docker model run hf.co/KVN03/Darnell
Training in progress, step 2000
Browse files- adapter_config.json +7 -5
- adapter_model.safetensors +2 -2
- added_tokens.json +7 -0
- special_tokens_map.json +25 -3
- tokenizer.json +45 -0
- tokenizer_config.json +47 -3
- training_args.bin +2 -2
adapter_config.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
| 3 |
"auto_mapping": null,
|
| 4 |
"base_model_name_or_path": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
| 5 |
"bias": "none",
|
|
|
|
| 6 |
"eva_config": null,
|
| 7 |
"exclude_modules": null,
|
| 8 |
"fan_in_fan_out": false,
|
|
@@ -12,21 +13,22 @@
|
|
| 12 |
"layers_pattern": null,
|
| 13 |
"layers_to_transform": null,
|
| 14 |
"loftq_config": {},
|
| 15 |
-
"lora_alpha":
|
| 16 |
"lora_bias": false,
|
| 17 |
-
"lora_dropout": 0.
|
| 18 |
"megatron_config": null,
|
| 19 |
"megatron_core": "megatron.core",
|
| 20 |
"modules_to_save": null,
|
| 21 |
"peft_type": "LORA",
|
| 22 |
-
"r":
|
| 23 |
"rank_pattern": {},
|
| 24 |
"revision": null,
|
| 25 |
"target_modules": [
|
| 26 |
-
"
|
| 27 |
-
"
|
| 28 |
],
|
| 29 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 30 |
"use_dora": false,
|
| 31 |
"use_rslora": false
|
| 32 |
}
|
|
|
|
| 3 |
"auto_mapping": null,
|
| 4 |
"base_model_name_or_path": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
| 5 |
"bias": "none",
|
| 6 |
+
"corda_config": null,
|
| 7 |
"eva_config": null,
|
| 8 |
"exclude_modules": null,
|
| 9 |
"fan_in_fan_out": false,
|
|
|
|
| 13 |
"layers_pattern": null,
|
| 14 |
"layers_to_transform": null,
|
| 15 |
"loftq_config": {},
|
| 16 |
+
"lora_alpha": 64,
|
| 17 |
"lora_bias": false,
|
| 18 |
+
"lora_dropout": 0.05,
|
| 19 |
"megatron_config": null,
|
| 20 |
"megatron_core": "megatron.core",
|
| 21 |
"modules_to_save": null,
|
| 22 |
"peft_type": "LORA",
|
| 23 |
+
"r": 16,
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
| 27 |
+
"q_proj",
|
| 28 |
+
"v_proj"
|
| 29 |
],
|
| 30 |
"task_type": "CAUSAL_LM",
|
| 31 |
+
"trainable_token_indices": null,
|
| 32 |
"use_dora": false,
|
| 33 |
"use_rslora": false
|
| 34 |
}
|
adapter_model.safetensors
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:974d7f06e423abf5fcd29e2772d58e6e5bcbef3c5208a3dc9762d7eb808700c2
|
| 3 |
+
size 533393376
|
added_tokens.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<|assistant|>": 32004,
|
| 3 |
+
"<|endoftext|>": 32002,
|
| 4 |
+
"<|pad|>": 32000,
|
| 5 |
+
"<|startoftext|>": 32001,
|
| 6 |
+
"<|user|>": 32003
|
| 7 |
+
}
|
special_tokens_map.json
CHANGED
|
@@ -1,19 +1,41 @@
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"bos_token": {
|
| 3 |
-
"content": "<
|
| 4 |
"lstrip": false,
|
| 5 |
"normalized": false,
|
| 6 |
"rstrip": false,
|
| 7 |
"single_word": false
|
| 8 |
},
|
| 9 |
"eos_token": {
|
| 10 |
-
"content": "<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
"lstrip": false,
|
| 12 |
"normalized": false,
|
| 13 |
"rstrip": false,
|
| 14 |
"single_word": false
|
| 15 |
},
|
| 16 |
-
"pad_token": "</s>",
|
| 17 |
"unk_token": {
|
| 18 |
"content": "<unk>",
|
| 19 |
"lstrip": false,
|
|
|
|
| 1 |
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
{
|
| 4 |
+
"content": "<|user|>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"content": "<|assistant|>",
|
| 12 |
+
"lstrip": false,
|
| 13 |
+
"normalized": false,
|
| 14 |
+
"rstrip": false,
|
| 15 |
+
"single_word": false
|
| 16 |
+
}
|
| 17 |
+
],
|
| 18 |
"bos_token": {
|
| 19 |
+
"content": "<|startoftext|>",
|
| 20 |
"lstrip": false,
|
| 21 |
"normalized": false,
|
| 22 |
"rstrip": false,
|
| 23 |
"single_word": false
|
| 24 |
},
|
| 25 |
"eos_token": {
|
| 26 |
+
"content": "<|endoftext|>",
|
| 27 |
+
"lstrip": false,
|
| 28 |
+
"normalized": false,
|
| 29 |
+
"rstrip": false,
|
| 30 |
+
"single_word": false
|
| 31 |
+
},
|
| 32 |
+
"pad_token": {
|
| 33 |
+
"content": "<|pad|>",
|
| 34 |
"lstrip": false,
|
| 35 |
"normalized": false,
|
| 36 |
"rstrip": false,
|
| 37 |
"single_word": false
|
| 38 |
},
|
|
|
|
| 39 |
"unk_token": {
|
| 40 |
"content": "<unk>",
|
| 41 |
"lstrip": false,
|
tokenizer.json
CHANGED
|
@@ -29,6 +29,51 @@
|
|
| 29 |
"rstrip": false,
|
| 30 |
"normalized": false,
|
| 31 |
"special": true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
}
|
| 33 |
],
|
| 34 |
"normalizer": {
|
|
|
|
| 29 |
"rstrip": false,
|
| 30 |
"normalized": false,
|
| 31 |
"special": true
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"id": 32000,
|
| 35 |
+
"content": "<|pad|>",
|
| 36 |
+
"single_word": false,
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"rstrip": false,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"special": true
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"id": 32001,
|
| 44 |
+
"content": "<|startoftext|>",
|
| 45 |
+
"single_word": false,
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"rstrip": false,
|
| 48 |
+
"normalized": false,
|
| 49 |
+
"special": true
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"id": 32002,
|
| 53 |
+
"content": "<|endoftext|>",
|
| 54 |
+
"single_word": false,
|
| 55 |
+
"lstrip": false,
|
| 56 |
+
"rstrip": false,
|
| 57 |
+
"normalized": false,
|
| 58 |
+
"special": true
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"id": 32003,
|
| 62 |
+
"content": "<|user|>",
|
| 63 |
+
"single_word": false,
|
| 64 |
+
"lstrip": false,
|
| 65 |
+
"rstrip": false,
|
| 66 |
+
"normalized": false,
|
| 67 |
+
"special": true
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"id": 32004,
|
| 71 |
+
"content": "<|assistant|>",
|
| 72 |
+
"single_word": false,
|
| 73 |
+
"lstrip": false,
|
| 74 |
+
"rstrip": false,
|
| 75 |
+
"normalized": false,
|
| 76 |
+
"special": true
|
| 77 |
}
|
| 78 |
],
|
| 79 |
"normalizer": {
|
tokenizer_config.json
CHANGED
|
@@ -26,16 +26,60 @@
|
|
| 26 |
"rstrip": false,
|
| 27 |
"single_word": false,
|
| 28 |
"special": true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
}
|
| 30 |
},
|
| 31 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
|
| 33 |
"clean_up_tokenization_spaces": false,
|
| 34 |
-
"eos_token": "<
|
| 35 |
"extra_special_tokens": {},
|
| 36 |
"legacy": false,
|
| 37 |
"model_max_length": 2048,
|
| 38 |
-
"pad_token": "<
|
| 39 |
"padding_side": "right",
|
| 40 |
"sp_model_kwargs": {},
|
| 41 |
"tokenizer_class": "LlamaTokenizer",
|
|
|
|
| 26 |
"rstrip": false,
|
| 27 |
"single_word": false,
|
| 28 |
"special": true
|
| 29 |
+
},
|
| 30 |
+
"32000": {
|
| 31 |
+
"content": "<|pad|>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false,
|
| 36 |
+
"special": true
|
| 37 |
+
},
|
| 38 |
+
"32001": {
|
| 39 |
+
"content": "<|startoftext|>",
|
| 40 |
+
"lstrip": false,
|
| 41 |
+
"normalized": false,
|
| 42 |
+
"rstrip": false,
|
| 43 |
+
"single_word": false,
|
| 44 |
+
"special": true
|
| 45 |
+
},
|
| 46 |
+
"32002": {
|
| 47 |
+
"content": "<|endoftext|>",
|
| 48 |
+
"lstrip": false,
|
| 49 |
+
"normalized": false,
|
| 50 |
+
"rstrip": false,
|
| 51 |
+
"single_word": false,
|
| 52 |
+
"special": true
|
| 53 |
+
},
|
| 54 |
+
"32003": {
|
| 55 |
+
"content": "<|user|>",
|
| 56 |
+
"lstrip": false,
|
| 57 |
+
"normalized": false,
|
| 58 |
+
"rstrip": false,
|
| 59 |
+
"single_word": false,
|
| 60 |
+
"special": true
|
| 61 |
+
},
|
| 62 |
+
"32004": {
|
| 63 |
+
"content": "<|assistant|>",
|
| 64 |
+
"lstrip": false,
|
| 65 |
+
"normalized": false,
|
| 66 |
+
"rstrip": false,
|
| 67 |
+
"single_word": false,
|
| 68 |
+
"special": true
|
| 69 |
}
|
| 70 |
},
|
| 71 |
+
"additional_special_tokens": [
|
| 72 |
+
"<|user|>",
|
| 73 |
+
"<|assistant|>"
|
| 74 |
+
],
|
| 75 |
+
"bos_token": "<|startoftext|>",
|
| 76 |
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
|
| 77 |
"clean_up_tokenization_spaces": false,
|
| 78 |
+
"eos_token": "<|endoftext|>",
|
| 79 |
"extra_special_tokens": {},
|
| 80 |
"legacy": false,
|
| 81 |
"model_max_length": 2048,
|
| 82 |
+
"pad_token": "<|pad|>",
|
| 83 |
"padding_side": "right",
|
| 84 |
"sp_model_kwargs": {},
|
| 85 |
"tokenizer_class": "LlamaTokenizer",
|
training_args.bin
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:304d9a5e064289574a22b3b55f9eb5a47a9f7b69b43c9814c21daa024f94779f
|
| 3 |
+
size 5624
|