Instructions to use tegana/model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use tegana/model with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "tegana/model") - Transformers
How to use tegana/model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tegana/model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tegana/model", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use tegana/model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tegana/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": "tegana/model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tegana/model
- SGLang
How to use tegana/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 "tegana/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": "tegana/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 "tegana/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": "tegana/model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tegana/model with Docker Model Runner:
docker model run hf.co/tegana/model
Training in progress, step 252
Browse files- .gitattributes +1 -0
- adapter_config.json +46 -0
- adapter_model.safetensors +3 -0
- chat_template.jinja +54 -0
- tokenizer.json +3 -0
- tokenizer_config.json +30 -0
- trainer_log.jsonl +28 -0
- training_args.bin +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
adapter_config.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "Qwen/Qwen2.5-1.5B-Instruct",
|
| 7 |
+
"bias": "none",
|
| 8 |
+
"corda_config": null,
|
| 9 |
+
"ensure_weight_tying": false,
|
| 10 |
+
"eva_config": null,
|
| 11 |
+
"exclude_modules": null,
|
| 12 |
+
"fan_in_fan_out": false,
|
| 13 |
+
"inference_mode": true,
|
| 14 |
+
"init_lora_weights": true,
|
| 15 |
+
"layer_replication": null,
|
| 16 |
+
"layers_pattern": null,
|
| 17 |
+
"layers_to_transform": null,
|
| 18 |
+
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 128,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.0,
|
| 22 |
+
"megatron_config": null,
|
| 23 |
+
"megatron_core": "megatron.core",
|
| 24 |
+
"modules_to_save": null,
|
| 25 |
+
"peft_type": "LORA",
|
| 26 |
+
"peft_version": "0.18.1",
|
| 27 |
+
"qalora_group_size": 16,
|
| 28 |
+
"r": 64,
|
| 29 |
+
"rank_pattern": {},
|
| 30 |
+
"revision": null,
|
| 31 |
+
"target_modules": [
|
| 32 |
+
"o_proj",
|
| 33 |
+
"down_proj",
|
| 34 |
+
"k_proj",
|
| 35 |
+
"v_proj",
|
| 36 |
+
"q_proj",
|
| 37 |
+
"up_proj",
|
| 38 |
+
"gate_proj"
|
| 39 |
+
],
|
| 40 |
+
"target_parameters": null,
|
| 41 |
+
"task_type": "CAUSAL_LM",
|
| 42 |
+
"trainable_token_indices": null,
|
| 43 |
+
"use_dora": false,
|
| 44 |
+
"use_qalora": false,
|
| 45 |
+
"use_rslora": false
|
| 46 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8fcde4a9e8531794a7c6f8e035d65e0627142045d9ff92d2679d86dc19d834d5
|
| 3 |
+
size 295488936
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|im_start|>system\n' }}
|
| 3 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 4 |
+
{{- messages[0]['content'] }}
|
| 5 |
+
{%- else %}
|
| 6 |
+
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
|
| 7 |
+
{%- endif %}
|
| 8 |
+
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 9 |
+
{%- for tool in tools %}
|
| 10 |
+
{{- "\n" }}
|
| 11 |
+
{{- tool | tojson }}
|
| 12 |
+
{%- endfor %}
|
| 13 |
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
| 14 |
+
{%- else %}
|
| 15 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 16 |
+
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
| 17 |
+
{%- else %}
|
| 18 |
+
{{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
|
| 19 |
+
{%- endif %}
|
| 20 |
+
{%- endif %}
|
| 21 |
+
{%- for message in messages %}
|
| 22 |
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
| 23 |
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
| 24 |
+
{%- elif message.role == "assistant" %}
|
| 25 |
+
{{- '<|im_start|>' + message.role }}
|
| 26 |
+
{%- if message.content %}
|
| 27 |
+
{{- '\n' + message.content }}
|
| 28 |
+
{%- endif %}
|
| 29 |
+
{%- for tool_call in message.tool_calls %}
|
| 30 |
+
{%- if tool_call.function is defined %}
|
| 31 |
+
{%- set tool_call = tool_call.function %}
|
| 32 |
+
{%- endif %}
|
| 33 |
+
{{- '\n<tool_call>\n{"name": "' }}
|
| 34 |
+
{{- tool_call.name }}
|
| 35 |
+
{{- '", "arguments": ' }}
|
| 36 |
+
{{- tool_call.arguments | tojson }}
|
| 37 |
+
{{- '}\n</tool_call>' }}
|
| 38 |
+
{%- endfor %}
|
| 39 |
+
{{- '<|im_end|>\n' }}
|
| 40 |
+
{%- elif message.role == "tool" %}
|
| 41 |
+
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
| 42 |
+
{{- '<|im_start|>user' }}
|
| 43 |
+
{%- endif %}
|
| 44 |
+
{{- '\n<tool_response>\n' }}
|
| 45 |
+
{{- message.content }}
|
| 46 |
+
{{- '\n</tool_response>' }}
|
| 47 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 48 |
+
{{- '<|im_end|>\n' }}
|
| 49 |
+
{%- endif %}
|
| 50 |
+
{%- endif %}
|
| 51 |
+
{%- endfor %}
|
| 52 |
+
{%- if add_generation_prompt %}
|
| 53 |
+
{{- '<|im_start|>assistant\n' }}
|
| 54 |
+
{%- endif %}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3fd169731d2cbde95e10bf356d66d5997fd885dd8dbb6fb4684da3f23b2585d8
|
| 3 |
+
size 11421892
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": null,
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|im_end|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|im_start|>",
|
| 10 |
+
"<|im_end|>",
|
| 11 |
+
"<|object_ref_start|>",
|
| 12 |
+
"<|object_ref_end|>",
|
| 13 |
+
"<|box_start|>",
|
| 14 |
+
"<|box_end|>",
|
| 15 |
+
"<|quad_start|>",
|
| 16 |
+
"<|quad_end|>",
|
| 17 |
+
"<|vision_start|>",
|
| 18 |
+
"<|vision_end|>",
|
| 19 |
+
"<|vision_pad|>",
|
| 20 |
+
"<|image_pad|>",
|
| 21 |
+
"<|video_pad|>"
|
| 22 |
+
],
|
| 23 |
+
"is_local": false,
|
| 24 |
+
"model_max_length": 131072,
|
| 25 |
+
"pad_token": "<|endoftext|>",
|
| 26 |
+
"padding_side": "right",
|
| 27 |
+
"split_special_tokens": false,
|
| 28 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 29 |
+
"unk_token": null
|
| 30 |
+
}
|
trainer_log.jsonl
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"current_steps": 10, "total_steps": 252, "loss": 0.5328742027282715, "lr": 3.461538461538462e-05, "epoch": 0.11940298507462686, "percentage": 3.97, "elapsed_time": "0:02:47", "remaining_time": "1:07:31"}
|
| 2 |
+
{"current_steps": 20, "total_steps": 252, "loss": 0.28172030448913576, "lr": 7.307692307692307e-05, "epoch": 0.23880597014925373, "percentage": 7.94, "elapsed_time": "0:05:41", "remaining_time": "1:05:56"}
|
| 3 |
+
{"current_steps": 30, "total_steps": 252, "loss": 0.22340788841247558, "lr": 9.995652871840006e-05, "epoch": 0.3582089552238806, "percentage": 11.9, "elapsed_time": "0:08:54", "remaining_time": "1:05:58"}
|
| 4 |
+
{"current_steps": 40, "total_steps": 252, "loss": 0.19026432037353516, "lr": 9.918580696928205e-05, "epoch": 0.47761194029850745, "percentage": 15.87, "elapsed_time": "0:11:59", "remaining_time": "1:03:32"}
|
| 5 |
+
{"current_steps": 50, "total_steps": 252, "loss": 0.1776690363883972, "lr": 9.746617916180905e-05, "epoch": 0.5970149253731343, "percentage": 19.84, "elapsed_time": "0:15:08", "remaining_time": "1:01:11"}
|
| 6 |
+
{"current_steps": 60, "total_steps": 252, "loss": 0.16183719635009766, "lr": 9.483082082658983e-05, "epoch": 0.7164179104477612, "percentage": 23.81, "elapsed_time": "0:18:08", "remaining_time": "0:58:02"}
|
| 7 |
+
{"current_steps": 70, "total_steps": 252, "loss": 0.18729711771011354, "lr": 9.133057401836159e-05, "epoch": 0.835820895522388, "percentage": 27.78, "elapsed_time": "0:21:12", "remaining_time": "0:55:07"}
|
| 8 |
+
{"current_steps": 80, "total_steps": 252, "loss": 0.17510976791381835, "lr": 8.703296645714609e-05, "epoch": 0.9552238805970149, "percentage": 31.75, "elapsed_time": "0:24:14", "remaining_time": "0:52:07"}
|
| 9 |
+
{"current_steps": 90, "total_steps": 252, "loss": 0.15757997035980226, "lr": 8.202090876498144e-05, "epoch": 1.0716417910447762, "percentage": 35.71, "elapsed_time": "0:26:54", "remaining_time": "0:48:26"}
|
| 10 |
+
{"current_steps": 100, "total_steps": 252, "loss": 0.14641659259796141, "lr": 7.639109493149537e-05, "epoch": 1.191044776119403, "percentage": 39.68, "elapsed_time": "0:29:47", "remaining_time": "0:45:16"}
|
| 11 |
+
{"current_steps": 100, "total_steps": 252, "eval_loss": 0.1869809627532959, "epoch": 1.191044776119403, "percentage": 39.68, "elapsed_time": "0:30:00", "remaining_time": "0:45:37"}
|
| 12 |
+
{"current_steps": 110, "total_steps": 252, "loss": 0.11394469738006592, "lr": 7.02521368669762e-05, "epoch": 1.31044776119403, "percentage": 43.65, "elapsed_time": "0:32:56", "remaining_time": "0:42:30"}
|
| 13 |
+
{"current_steps": 120, "total_steps": 252, "loss": 0.11726579666137696, "lr": 6.372246903165446e-05, "epoch": 1.4298507462686567, "percentage": 47.62, "elapsed_time": "0:36:08", "remaining_time": "0:39:44"}
|
| 14 |
+
{"current_steps": 130, "total_steps": 252, "loss": 0.12615565061569214, "lr": 5.692806356566095e-05, "epoch": 1.5492537313432835, "percentage": 51.59, "elapsed_time": "0:39:02", "remaining_time": "0:36:38"}
|
| 15 |
+
{"current_steps": 140, "total_steps": 252, "loss": 0.11287055015563965, "lr": 5e-05, "epoch": 1.6686567164179105, "percentage": 55.56, "elapsed_time": "0:41:52", "remaining_time": "0:33:30"}
|
| 16 |
+
{"current_steps": 150, "total_steps": 252, "loss": 0.10663604736328125, "lr": 4.307193643433907e-05, "epoch": 1.7880597014925375, "percentage": 59.52, "elapsed_time": "0:45:19", "remaining_time": "0:30:48"}
|
| 17 |
+
{"current_steps": 160, "total_steps": 252, "loss": 0.107212233543396, "lr": 3.627753096834555e-05, "epoch": 1.9074626865671642, "percentage": 63.49, "elapsed_time": "0:48:27", "remaining_time": "0:27:51"}
|
| 18 |
+
{"current_steps": 170, "total_steps": 252, "loss": 0.11782596111297608, "lr": 2.9747863133023803e-05, "epoch": 2.023880597014925, "percentage": 67.46, "elapsed_time": "0:51:26", "remaining_time": "0:24:48"}
|
| 19 |
+
{"current_steps": 180, "total_steps": 252, "loss": 0.0834022581577301, "lr": 2.3608905068504637e-05, "epoch": 2.1432835820895524, "percentage": 71.43, "elapsed_time": "0:54:14", "remaining_time": "0:21:41"}
|
| 20 |
+
{"current_steps": 190, "total_steps": 252, "loss": 0.08206533193588257, "lr": 1.7979091235018565e-05, "epoch": 2.262686567164179, "percentage": 75.4, "elapsed_time": "0:57:31", "remaining_time": "0:18:46"}
|
| 21 |
+
{"current_steps": 200, "total_steps": 252, "loss": 0.08110529780387879, "lr": 1.2967033542853917e-05, "epoch": 2.382089552238806, "percentage": 79.37, "elapsed_time": "1:00:32", "remaining_time": "0:15:44"}
|
| 22 |
+
{"current_steps": 200, "total_steps": 252, "eval_loss": 0.1738630086183548, "epoch": 2.382089552238806, "percentage": 79.37, "elapsed_time": "1:00:45", "remaining_time": "0:15:47"}
|
| 23 |
+
{"current_steps": 210, "total_steps": 252, "loss": 0.08261927366256713, "lr": 8.669425981638413e-06, "epoch": 2.5014925373134327, "percentage": 83.33, "elapsed_time": "1:03:33", "remaining_time": "0:12:42"}
|
| 24 |
+
{"current_steps": 220, "total_steps": 252, "loss": 0.08233516216278076, "lr": 5.169179173410177e-06, "epoch": 2.62089552238806, "percentage": 87.3, "elapsed_time": "1:06:23", "remaining_time": "0:09:39"}
|
| 25 |
+
{"current_steps": 230, "total_steps": 252, "loss": 0.07825937271118164, "lr": 2.533820838190959e-06, "epoch": 2.7402985074626867, "percentage": 91.27, "elapsed_time": "1:09:29", "remaining_time": "0:06:38"}
|
| 26 |
+
{"current_steps": 240, "total_steps": 252, "loss": 0.08194915056228638, "lr": 8.141930307179468e-07, "epoch": 2.8597014925373134, "percentage": 95.24, "elapsed_time": "1:12:46", "remaining_time": "0:03:38"}
|
| 27 |
+
{"current_steps": 250, "total_steps": 252, "loss": 0.08224834203720092, "lr": 4.3471281599938295e-08, "epoch": 2.97910447761194, "percentage": 99.21, "elapsed_time": "1:15:55", "remaining_time": "0:00:36"}
|
| 28 |
+
{"current_steps": 252, "total_steps": 252, "epoch": 3.0, "percentage": 100.0, "elapsed_time": "1:16:27", "remaining_time": "0:00:00"}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a07b9caae9ac5e97a7c1dadc98f45fdb304d552d5d5b383b06e0e2cf036603e
|
| 3 |
+
size 5649
|