Instructions to use PersonaPO/lfm25-8b-a1b-pvlora-neuroticism-high with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PersonaPO/lfm25-8b-a1b-pvlora-neuroticism-high with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("PersonaPO/lfm25-8b-a1b-pvlora-neuroticism-high", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Training in progress, step 500
Browse files- .gitattributes +1 -0
- README.md +58 -0
- adapter_config.json +45 -0
- adapter_model.safetensors +3 -0
- chat_template.jinja +105 -0
- tokenizer.json +3 -0
- tokenizer_config.json +13 -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
|
README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: LiquidAI/LFM2.5-8B-A1B-Base
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: lfm25-8b-a1b-pvlora-neuroticism-high
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- trl
|
| 8 |
+
- sft
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for lfm25-8b-a1b-pvlora-neuroticism-high
|
| 13 |
+
|
| 14 |
+
This model is a fine-tuned version of [LiquidAI/LFM2.5-8B-A1B-Base](https://huggingface.co/LiquidAI/LFM2.5-8B-A1B-Base).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
+
|
| 17 |
+
## Quick start
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
+
|
| 22 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 23 |
+
generator = pipeline("text-generation", model="PersonaPO/lfm25-8b-a1b-pvlora-neuroticism-high", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Training procedure
|
| 29 |
+
|
| 30 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/alirezasakhaeirad/personapo/runs/41j1grou)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
This model was trained with SFT.
|
| 35 |
+
|
| 36 |
+
### Framework versions
|
| 37 |
+
|
| 38 |
+
- TRL: 1.5.1
|
| 39 |
+
- Transformers: 5.11.0
|
| 40 |
+
- Pytorch: 2.12.0
|
| 41 |
+
- Datasets: 5.0.0
|
| 42 |
+
- Tokenizers: 0.22.2
|
| 43 |
+
|
| 44 |
+
## Citations
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
Cite TRL as:
|
| 49 |
+
|
| 50 |
+
```bibtex
|
| 51 |
+
@software{vonwerra2020trl,
|
| 52 |
+
title = {{TRL: Transformers Reinforcement Learning}},
|
| 53 |
+
author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
|
| 54 |
+
license = {Apache-2.0},
|
| 55 |
+
url = {https://github.com/huggingface/trl},
|
| 56 |
+
year = {2020}
|
| 57 |
+
}
|
| 58 |
+
```
|
adapter_config.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "LiquidAI/LFM2.5-8B-A1B-Base",
|
| 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": 32,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.05,
|
| 22 |
+
"lora_ga_config": null,
|
| 23 |
+
"megatron_config": null,
|
| 24 |
+
"megatron_core": "megatron.core",
|
| 25 |
+
"modules_to_save": null,
|
| 26 |
+
"peft_type": "LORA",
|
| 27 |
+
"peft_version": "0.19.1",
|
| 28 |
+
"qalora_group_size": 16,
|
| 29 |
+
"r": 16,
|
| 30 |
+
"rank_pattern": {},
|
| 31 |
+
"revision": null,
|
| 32 |
+
"target_modules": [
|
| 33 |
+
"k_proj",
|
| 34 |
+
"v_proj",
|
| 35 |
+
"out_proj",
|
| 36 |
+
"q_proj"
|
| 37 |
+
],
|
| 38 |
+
"target_parameters": null,
|
| 39 |
+
"task_type": "CAUSAL_LM",
|
| 40 |
+
"trainable_token_indices": null,
|
| 41 |
+
"use_bdlora": null,
|
| 42 |
+
"use_dora": false,
|
| 43 |
+
"use_qalora": false,
|
| 44 |
+
"use_rslora": false
|
| 45 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:770cd5d8f2095ca67fb43ed5634039497ad111443c5cd23faa87c7ad164d41ca
|
| 3 |
+
size 9841464
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{{- bos_token -}}
|
| 2 |
+
{%- set preserve_thinking = preserve_thinking | default(false) -%}
|
| 3 |
+
|
| 4 |
+
{%- macro format_arg_value(arg_value) -%}
|
| 5 |
+
{%- if arg_value is string -%}
|
| 6 |
+
{{- "'" + arg_value + "'" -}}
|
| 7 |
+
{%- elif arg_value is mapping -%}
|
| 8 |
+
{{- arg_value | tojson -}}
|
| 9 |
+
{%- else -%}
|
| 10 |
+
{{- arg_value | string -}}
|
| 11 |
+
{%- endif -%}
|
| 12 |
+
{%- endmacro -%}
|
| 13 |
+
|
| 14 |
+
{%- macro parse_content(content) -%}
|
| 15 |
+
{%- if content is string -%}
|
| 16 |
+
{{- content -}}
|
| 17 |
+
{%- else -%}
|
| 18 |
+
{%- set _ns = namespace(result="") -%}
|
| 19 |
+
{%- for item in content -%}
|
| 20 |
+
{%- if item["type"] == "image" -%}
|
| 21 |
+
{%- set _ns.result = _ns.result + "<image>" -%}
|
| 22 |
+
{%- elif item["type"] == "text" -%}
|
| 23 |
+
{%- set _ns.result = _ns.result + item["text"] -%}
|
| 24 |
+
{%- else -%}
|
| 25 |
+
{%- set _ns.result = _ns.result + item | tojson -%}
|
| 26 |
+
{%- endif -%}
|
| 27 |
+
{%- endfor -%}
|
| 28 |
+
{{- _ns.result -}}
|
| 29 |
+
{%- endif -%}
|
| 30 |
+
{%- endmacro -%}
|
| 31 |
+
|
| 32 |
+
{%- macro render_tool_calls(tool_calls) -%}
|
| 33 |
+
{%- set tool_calls_ns = namespace(tool_calls=[]) -%}
|
| 34 |
+
{%- for tool_call in tool_calls -%}
|
| 35 |
+
{%- set func_name = tool_call["function"]["name"] -%}
|
| 36 |
+
{%- set func_args = tool_call["function"]["arguments"] -%}
|
| 37 |
+
{%- set args_ns = namespace(arg_strings=[]) -%}
|
| 38 |
+
{%- for arg_name, arg_value in func_args.items() -%}
|
| 39 |
+
{%- set args_ns.arg_strings = args_ns.arg_strings + [arg_name + "=" + format_arg_value(arg_value)] -%}
|
| 40 |
+
{%- endfor -%}
|
| 41 |
+
{%- set tool_calls_ns.tool_calls = tool_calls_ns.tool_calls + [func_name + "(" + (args_ns.arg_strings | join(", ")) + ")"] -%}
|
| 42 |
+
{%- endfor -%}
|
| 43 |
+
{{- "<|tool_call_start|>[" + (tool_calls_ns.tool_calls | join(", ")) + "]<|tool_call_end|>" -}}
|
| 44 |
+
{%- endmacro -%}
|
| 45 |
+
|
| 46 |
+
{%- set ns = namespace(system_prompt="", last_user_index=-1) -%}
|
| 47 |
+
{%- if messages[0]["role"] == "system" -%}
|
| 48 |
+
{%- if messages[0].get("content") -%}
|
| 49 |
+
{%- set ns.system_prompt = parse_content(messages[0]["content"]) -%}
|
| 50 |
+
{%- endif -%}
|
| 51 |
+
{%- set messages = messages[1:] -%}
|
| 52 |
+
{%- endif -%}
|
| 53 |
+
{%- if tools -%}
|
| 54 |
+
{%- set ns.system_prompt = ns.system_prompt + ("\n\n" if ns.system_prompt else "") + "Today's date: " + strftime_now("%Y-%m-%d") + "\n\nList of tools: " + (tools | tojson) -%}
|
| 55 |
+
{%- endif -%}
|
| 56 |
+
{%- if ns.system_prompt -%}
|
| 57 |
+
{{- "<|im_start|>system\n" + ns.system_prompt + "<|im_end|>\n" -}}
|
| 58 |
+
{%- endif -%}
|
| 59 |
+
{%- for message in messages -%}
|
| 60 |
+
{%- if message["role"] == "user" -%}
|
| 61 |
+
{%- set ns.last_user_index = loop.index0 -%}
|
| 62 |
+
{%- endif -%}
|
| 63 |
+
{%- endfor -%}
|
| 64 |
+
{%- for message in messages -%}
|
| 65 |
+
{{- "<|im_start|>" + message.role + "\n" -}}
|
| 66 |
+
{%- if message.role == "assistant" -%}
|
| 67 |
+
{%- generation -%}
|
| 68 |
+
{%- if message.thinking is defined and (preserve_thinking or loop.index0 > ns.last_user_index) -%}
|
| 69 |
+
{{- "<think>" + message.thinking + "</think>" -}}
|
| 70 |
+
{%- endif -%}
|
| 71 |
+
{%- set _cfm_tag = "CONTINUE_FINAL_MESSAGE_TAG " -%}
|
| 72 |
+
{%- set _has_cfm = false -%}
|
| 73 |
+
{%- if message.content is defined -%}
|
| 74 |
+
{%- set content = parse_content(message.content) -%}
|
| 75 |
+
{%- if not (preserve_thinking or loop.index0 > ns.last_user_index) -%}
|
| 76 |
+
{%- if "</think>" in content -%}
|
| 77 |
+
{%- set content = content.split("</think>")[-1] | trim -%}
|
| 78 |
+
{%- endif -%}
|
| 79 |
+
{%- endif -%}
|
| 80 |
+
{%- if message.tool_calls is defined and content.endswith(_cfm_tag) -%}
|
| 81 |
+
{%- set _has_cfm = true -%}
|
| 82 |
+
{%- set _trunc_len = (content | length) - (_cfm_tag | length) -%}
|
| 83 |
+
{{- content[:_trunc_len] -}}
|
| 84 |
+
{%- else -%}
|
| 85 |
+
{{- content -}}
|
| 86 |
+
{%- endif -%}
|
| 87 |
+
{%- endif -%}
|
| 88 |
+
{%- if message.tool_calls is defined -%}
|
| 89 |
+
{{- render_tool_calls(message.tool_calls) -}}
|
| 90 |
+
{%- endif -%}
|
| 91 |
+
{%- if _has_cfm -%}
|
| 92 |
+
{{- _cfm_tag -}}
|
| 93 |
+
{%- endif -%}
|
| 94 |
+
{{- "<|im_end|>\n" -}}
|
| 95 |
+
{%- endgeneration -%}
|
| 96 |
+
{%- else %}
|
| 97 |
+
{%- if message.get("content") -%}
|
| 98 |
+
{{- parse_content(message["content"]) -}}
|
| 99 |
+
{%- endif -%}
|
| 100 |
+
{{- "<|im_end|>\n" -}}
|
| 101 |
+
{%- endif %}
|
| 102 |
+
{%- endfor -%}
|
| 103 |
+
{%- if add_generation_prompt -%}
|
| 104 |
+
{{- "<|im_start|>assistant\n" -}}
|
| 105 |
+
{%- endif -%}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c4687c0046da6579aba6f9aa713e9bed61e5fd210b0e012028ae57751d028689
|
| 3 |
+
size 17905589
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<|startoftext|>",
|
| 4 |
+
"clean_up_tokenization_spaces": false,
|
| 5 |
+
"eos_token": "<|im_end|>",
|
| 6 |
+
"is_local": false,
|
| 7 |
+
"legacy": false,
|
| 8 |
+
"local_files_only": false,
|
| 9 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 10 |
+
"pad_token": "<|pad|>",
|
| 11 |
+
"tokenizer_class": "TokenizersBackend",
|
| 12 |
+
"use_default_system_prompt": false
|
| 13 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31cb877ddca5061f70834c8d11c507e1c9e8fb51368fabc2c7dfc7f441759f66
|
| 3 |
+
size 5777
|