Text Generation
Transformers
Safetensors
Chinese
llama
counseltraj
counseltrajlm
counseling
conversational
merged
text-generation-inference
Instructions to use UEC-InabaLab/Llama-3.1-8B-CounselTrajLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UEC-InabaLab/Llama-3.1-8B-CounselTrajLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="UEC-InabaLab/Llama-3.1-8B-CounselTrajLM") 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("UEC-InabaLab/Llama-3.1-8B-CounselTrajLM") model = AutoModelForCausalLM.from_pretrained("UEC-InabaLab/Llama-3.1-8B-CounselTrajLM", 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 UEC-InabaLab/Llama-3.1-8B-CounselTrajLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/UEC-InabaLab/Llama-3.1-8B-CounselTrajLM
- SGLang
How to use UEC-InabaLab/Llama-3.1-8B-CounselTrajLM 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 "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM" \ --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": "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM", "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 "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM" \ --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": "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use UEC-InabaLab/Llama-3.1-8B-CounselTrajLM with Docker Model Runner:
docker model run hf.co/UEC-InabaLab/Llama-3.1-8B-CounselTrajLM
Release merged BF16 CounselTrajLM based on Llama-3.1-8B-Instruct
Browse files- .gitattributes +1 -0
- LICENSE +114 -0
- NOTICE +1 -0
- README.md +142 -0
- SHA256SUMS +26 -0
- USE_POLICY.md +51 -0
- base_origin.json +4 -0
- chat_template.jinja +109 -0
- config.json +40 -0
- examples/histories.jsonl +3 -0
- examples/replies.jsonl +3 -0
- generate_reply.py +111 -0
- generation_config.json +12 -0
- model-00001-of-00009.safetensors +3 -0
- model-00002-of-00009.safetensors +3 -0
- model-00003-of-00009.safetensors +3 -0
- model-00004-of-00009.safetensors +3 -0
- model-00005-of-00009.safetensors +3 -0
- model-00006-of-00009.safetensors +3 -0
- model-00007-of-00009.safetensors +3 -0
- model-00008-of-00009.safetensors +3 -0
- model-00009-of-00009.safetensors +3 -0
- model.safetensors.index.json +299 -0
- requirements.txt +5 -0
- tokenizer.json +3 -0
- tokenizer_config.json +13 -0
- training_summary.json +30 -0
- validation.json +35 -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
|
LICENSE
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
LLAMA 3.1 COMMUNITY LICENSE AGREEMENT
|
| 2 |
+
Llama 3.1 Version Release Date: July 23, 2024
|
| 3 |
+
|
| 4 |
+
“Agreement” means the terms and conditions for use, reproduction, distribution and modification of the
|
| 5 |
+
Llama Materials set forth herein.
|
| 6 |
+
|
| 7 |
+
“Documentation” means the specifications, manuals and documentation accompanying Llama 3.1
|
| 8 |
+
distributed by Meta at https://llama.meta.com/doc/overview.
|
| 9 |
+
|
| 10 |
+
“Licensee” or “you” means you, or your employer or any other person or entity (if you are entering into
|
| 11 |
+
this Agreement on such person or entity’s behalf), of the age required under applicable laws, rules or
|
| 12 |
+
regulations to provide legal consent and that has legal authority to bind your employer or such other
|
| 13 |
+
person or entity if you are entering in this Agreement on their behalf.
|
| 14 |
+
|
| 15 |
+
“Llama 3.1” means the foundational large language models and software and algorithms, including
|
| 16 |
+
machine-learning model code, trained model weights, inference-enabling code, training-enabling code,
|
| 17 |
+
fine-tuning enabling code and other elements of the foregoing distributed by Meta at
|
| 18 |
+
https://llama.meta.com/llama-downloads.
|
| 19 |
+
|
| 20 |
+
“Llama Materials” means, collectively, Meta’s proprietary Llama 3.1 and Documentation (and any
|
| 21 |
+
portion thereof) made available under this Agreement.
|
| 22 |
+
|
| 23 |
+
“Meta” or “we” means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your
|
| 24 |
+
principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located
|
| 25 |
+
outside of the EEA or Switzerland).
|
| 26 |
+
|
| 27 |
+
By clicking “I Accept” below or by using or distributing any portion or element of the Llama Materials,
|
| 28 |
+
you agree to be bound by this Agreement.
|
| 29 |
+
|
| 30 |
+
1. License Rights and Redistribution.
|
| 31 |
+
|
| 32 |
+
a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free
|
| 33 |
+
limited license under Meta’s intellectual property or other rights owned by Meta embodied in the Llama
|
| 34 |
+
Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the
|
| 35 |
+
Llama Materials.
|
| 36 |
+
|
| 37 |
+
b. Redistribution and Use.
|
| 38 |
+
|
| 39 |
+
i. If you distribute or make available the Llama Materials (or any derivative works
|
| 40 |
+
thereof), or a product or service (including another AI model) that contains any of them, you shall (A)
|
| 41 |
+
provide a copy of this Agreement with any such Llama Materials; and (B) prominently display “Built with
|
| 42 |
+
Llama” on a related website, user interface, blogpost, about page, or product documentation. If you use
|
| 43 |
+
the Llama Materials or any outputs or results of the Llama Materials to create, train, fine tune, or
|
| 44 |
+
otherwise improve an AI model, which is distributed or made available, you shall also include “Llama” at
|
| 45 |
+
the beginning of any such AI model name.
|
| 46 |
+
|
| 47 |
+
ii. If you receive Llama Materials, or any derivative works thereof, from a Licensee as part
|
| 48 |
+
of an integrated end user product, then Section 2 of this Agreement will not apply to you.
|
| 49 |
+
|
| 50 |
+
iii. You must retain in all copies of the Llama Materials that you distribute the following
|
| 51 |
+
attribution notice within a “Notice” text file distributed as a part of such copies: “Llama 3.1 is
|
| 52 |
+
licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights
|
| 53 |
+
Reserved.”
|
| 54 |
+
|
| 55 |
+
iv. Your use of the Llama Materials must comply with applicable laws and regulations
|
| 56 |
+
(including trade compliance laws and regulations) and adhere to the Acceptable Use Policy for the Llama
|
| 57 |
+
Materials (available at https://llama.meta.com/llama3_1/use-policy), which is hereby incorporated by
|
| 58 |
+
reference into this Agreement.
|
| 59 |
+
|
| 60 |
+
2. Additional Commercial Terms. If, on the Llama 3.1 version release date, the monthly active users
|
| 61 |
+
of the products or services made available by or for Licensee, or Licensee’s affiliates, is greater than 700
|
| 62 |
+
million monthly active users in the preceding calendar month, you must request a license from Meta,
|
| 63 |
+
which Meta may grant to you in its sole discretion, and you are not authorized to exercise any of the
|
| 64 |
+
rights under this Agreement unless or until Meta otherwise expressly grants you such rights.
|
| 65 |
+
|
| 66 |
+
3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY
|
| 67 |
+
OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF
|
| 68 |
+
ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,
|
| 69 |
+
INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,
|
| 70 |
+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR
|
| 71 |
+
DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND
|
| 72 |
+
ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND
|
| 73 |
+
RESULTS.
|
| 74 |
+
|
| 75 |
+
4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF
|
| 76 |
+
LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING
|
| 77 |
+
OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL,
|
| 78 |
+
INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED
|
| 79 |
+
OF THE POSSIBILITY OF ANY OF THE FOREGOING.
|
| 80 |
+
|
| 81 |
+
5. Intellectual Property.
|
| 82 |
+
|
| 83 |
+
a. No trademark licenses are granted under this Agreement, and in connection with the Llama
|
| 84 |
+
Materials, neither Meta nor Licensee may use any name or mark owned by or associated with the other
|
| 85 |
+
or any of its affiliates, except as required for reasonable and customary use in describing and
|
| 86 |
+
redistributing the Llama Materials or as set forth in this Section 5(a). Meta hereby grants you a license to
|
| 87 |
+
use “Llama” (the “Mark”) solely as required to comply with the last sentence of Section 1.b.i. You will
|
| 88 |
+
comply with Meta’s brand guidelines (currently accessible at
|
| 89 |
+
https://about.meta.com/brand/resources/meta/company-brand/ ). All goodwill arising out of your use
|
| 90 |
+
of the Mark will inure to the benefit of Meta.
|
| 91 |
+
|
| 92 |
+
b. Subject to Meta’s ownership of Llama Materials and derivatives made by or for Meta, with
|
| 93 |
+
respect to any derivative works and modifications of the Llama Materials that are made by you, as
|
| 94 |
+
between you and Meta, you are and will be the owner of such derivative works and modifications.
|
| 95 |
+
|
| 96 |
+
c. If you institute litigation or other proceedings against Meta or any entity (including a
|
| 97 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Llama Materials or Llama 3.1 outputs or
|
| 98 |
+
results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other
|
| 99 |
+
rights owned or licensable by you, then any licenses granted to you under this Agreement shall
|
| 100 |
+
terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold
|
| 101 |
+
harmless Meta from and against any claim by any third party arising out of or related to your use or
|
| 102 |
+
distribution of the Llama Materials.
|
| 103 |
+
|
| 104 |
+
6. Term and Termination. The term of this Agreement will commence upon your acceptance of this
|
| 105 |
+
Agreement or access to the Llama Materials and will continue in full force and effect until terminated in
|
| 106 |
+
accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in
|
| 107 |
+
breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete
|
| 108 |
+
and cease use of the Llama Materials. Sections 3, 4 and 7 shall survive the termination of this
|
| 109 |
+
Agreement.
|
| 110 |
+
|
| 111 |
+
7. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of
|
| 112 |
+
the State of California without regard to choice of law principles, and the UN Convention on Contracts
|
| 113 |
+
for the International Sale of Goods does not apply to this Agreement. The courts of California shall have
|
| 114 |
+
exclusive jurisdiction of any dispute arising out of this Agreement.
|
NOTICE
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
|
README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: llama3.1
|
| 3 |
+
language:
|
| 4 |
+
- zh
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
base_model: meta-llama/Llama-3.1-8B-Instruct
|
| 8 |
+
base_model_relation: finetune
|
| 9 |
+
datasets:
|
| 10 |
+
- UEC-InabaLab/CounselTrajD
|
| 11 |
+
tags:
|
| 12 |
+
- llama
|
| 13 |
+
- counseltraj
|
| 14 |
+
- counseltrajlm
|
| 15 |
+
- counseling
|
| 16 |
+
- conversational
|
| 17 |
+
- merged
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# Llama-3.1-8B-CounselTrajLM
|
| 21 |
+
|
| 22 |
+
**Built with Llama**
|
| 23 |
+
|
| 24 |
+
📄 **Paper:** [CounselTraj (arXiv:2611.24168)](https://arxiv.org/abs/2611.24168)
|
| 25 |
+
|
| 26 |
+
Llama-3.1-8B-CounselTrajLM is the Llama 3.1 backbone version of CounselTrajLM,
|
| 27 |
+
fine-tuned on [CounselTrajD](https://huggingface.co/datasets/UEC-InabaLab/CounselTrajD)
|
| 28 |
+
to generate the next Chinese counselor response from dialogue history. Its base
|
| 29 |
+
checkpoint is [meta-llama/Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct).
|
| 30 |
+
|
| 31 |
+
The repository contains the **complete merged BF16 model**, in nine safetensors
|
| 32 |
+
shards totaling approximately **16.1 GB**, together with its tokenizer, chat
|
| 33 |
+
template, inference script, and checksums. It loads directly with Transformers.
|
| 34 |
+
The project, construction pipeline, and other model versions are available on
|
| 35 |
+
[GitHub](https://github.com/UEC-InabaLab/CounselTraj).
|
| 36 |
+
|
| 37 |
+
## License and attribution
|
| 38 |
+
|
| 39 |
+
This model is distributed under the **Llama 3.1 Community License Agreement**.
|
| 40 |
+
The original agreement is included in [LICENSE](LICENSE), and the Llama 3.1
|
| 41 |
+
Acceptable Use Policy is included in [USE_POLICY.md](USE_POLICY.md). The required
|
| 42 |
+
attribution is provided in [NOTICE](NOTICE). Use and redistribution are subject to
|
| 43 |
+
these terms.
|
| 44 |
+
|
| 45 |
+
## Training details
|
| 46 |
+
|
| 47 |
+
| Item | Value |
|
| 48 |
+
| --- | --- |
|
| 49 |
+
| Base model | meta-llama/Llama-3.1-8B-Instruct |
|
| 50 |
+
| Base revision | `0e9e39f249a16976918f6564b8830bc894c89659` |
|
| 51 |
+
| Training data | CounselTrajD; dialogue-disjoint 90/10 train/validation split |
|
| 52 |
+
| Training / validation examples | 425,679 / 47,528 next-response examples |
|
| 53 |
+
| Fine-tuning method | QLoRA; adapter merged into the unquantized BF16 base for release |
|
| 54 |
+
| LoRA rank / alpha / dropout | 32 / 64 / 0.05 |
|
| 55 |
+
| Learning rate | 0.0002 |
|
| 56 |
+
| Schedule / warmup ratio | Cosine / 0.06 |
|
| 57 |
+
| Epochs | 3; final-epoch export |
|
| 58 |
+
| Final optimizer step | 79,815 |
|
| 59 |
+
| Effective batch size | 16 |
|
| 60 |
+
| Maximum training sequence length | 2,048 tokens |
|
| 61 |
+
| Maximum history length | Last 1,800 characters |
|
| 62 |
+
| Release format | Complete merged BF16 safetensors |
|
| 63 |
+
|
| 64 |
+
Validation was used for monitoring. The released model is the final epoch.
|
| 65 |
+
See [training_summary.json](training_summary.json) for the recorded settings.
|
| 66 |
+
|
| 67 |
+
## Generate a reply
|
| 68 |
+
|
| 69 |
+
The repository is public. Download it and install the inference dependencies:
|
| 70 |
+
|
| 71 |
+
```bash
|
| 72 |
+
pip install huggingface_hub
|
| 73 |
+
python -c 'from huggingface_hub import snapshot_download; snapshot_download("UEC-InabaLab/Llama-3.1-8B-CounselTrajLM", local_dir="Llama-3.1-8B-CounselTrajLM")'
|
| 74 |
+
cd Llama-3.1-8B-CounselTrajLM
|
| 75 |
+
pip install -r requirements.txt
|
| 76 |
+
python generate_reply.py --model . --input-file examples/histories.jsonl
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
Or provide a history directly:
|
| 80 |
+
|
| 81 |
+
```bash
|
| 82 |
+
python generate_reply.py --model . --history 'client:最近工作压力很大,晚上总是睡不好。'
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
Input JSONL rows contain an optional `id` and a nonempty `history` string. Use
|
| 86 |
+
`client:` and `counselor:` speaker prefixes within the history. The script uses the
|
| 87 |
+
original counselor system instruction and training prompt format, retaining the
|
| 88 |
+
last 1,800 history characters. It outputs JSON with the generated `response`.
|
| 89 |
+
The three bundled histories are newly written synthetic examples.
|
| 90 |
+
|
| 91 |
+
After downloading the repository, it can also be used from Python:
|
| 92 |
+
|
| 93 |
+
```python
|
| 94 |
+
from generate_reply import load_model, generate_reply
|
| 95 |
+
|
| 96 |
+
tokenizer, model = load_model("UEC-InabaLab/Llama-3.1-8B-CounselTrajLM")
|
| 97 |
+
response = generate_reply(
|
| 98 |
+
tokenizer, model,
|
| 99 |
+
"client:最近工作压力很大,晚上总是睡不好。",
|
| 100 |
+
)
|
| 101 |
+
print(response)
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
The complete weights load in BF16, with additional memory required for inference.
|
| 105 |
+
A separate base-model download or PEFT adapter loading is not required.
|
| 106 |
+
The release was checked with Transformers 5.13.0, PyTorch 2.5.1,
|
| 107 |
+
Accelerate 1.13.0, and safetensors 0.8.0. The GPU generation checks and integrity
|
| 108 |
+
results are recorded in [validation.json](validation.json); file checksums are in
|
| 109 |
+
[SHA256SUMS](SHA256SUMS).
|
| 110 |
+
|
| 111 |
+
## Training data and references
|
| 112 |
+
|
| 113 |
+
CounselTrajD contains 10,964 synthetic Chinese counseling dialogues expanded from
|
| 114 |
+
three sources:
|
| 115 |
+
|
| 116 |
+
- SmileChat: Qiu et al. (2024), [SMILE](https://aclanthology.org/2024.findings-emnlp.34/).
|
| 117 |
+
- PsyDTCorpus: Xie et al. (2025), [PsyDT](https://aclanthology.org/2025.acl-long.55/).
|
| 118 |
+
- CPsyCounD: Zhang et al. (2024), [CPsyCoun](https://aclanthology.org/2024.findings-acl.830/).
|
| 119 |
+
|
| 120 |
+
See the project's [licensing scope](https://github.com/UEC-InabaLab/CounselTraj/blob/master/LICENSING.md)
|
| 121 |
+
and [source notices](https://github.com/UEC-InabaLab/CounselTraj/blob/master/THIRD_PARTY_NOTICES.md)
|
| 122 |
+
for the source-specific data terms. These data terms are separate from the
|
| 123 |
+
Llama 3.1 model license.
|
| 124 |
+
|
| 125 |
+
## Intended use and limitations
|
| 126 |
+
|
| 127 |
+
This model is intended for research on Chinese counseling dialogue generation,
|
| 128 |
+
subject to the Llama 3.1 license and Acceptable Use Policy. Its training data are
|
| 129 |
+
synthetic. Generated responses may be inaccurate, inappropriate, or unsafe, and
|
| 130 |
+
the model is not a substitute for professional mental health care.
|
| 131 |
+
|
| 132 |
+
## Citation
|
| 133 |
+
|
| 134 |
+
```bibtex
|
| 135 |
+
@inproceedings{qi-inaba-2027-counseltraj,
|
| 136 |
+
title = "{CounselTraj}: Synthesizing Process-Aware Psychological Counseling Dialogues via Dialogue-Act Trajectory Planning",
|
| 137 |
+
author = "Qi, Zhiyang and Inaba, Michimasa",
|
| 138 |
+
booktitle = "Proceedings of the 20th Conference of the European Chapter of the Association for Computational Linguistics",
|
| 139 |
+
year = "2027",
|
| 140 |
+
url = "https://arxiv.org/abs/2611.24168",
|
| 141 |
+
}
|
| 142 |
+
```
|
SHA256SUMS
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
64e1b2889b7892e6bbe7a7ed5bfe6ff793c61f9d584345f8f41cf9f5cb30a369 LICENSE
|
| 2 |
+
9b4ce1898c6fdbefd6d0ca4d40a55cb994ed86ae3fd56166866b988bee7a6464 NOTICE
|
| 3 |
+
8b05e79a3ac7bb6e9020ffe9bd0259f0c9ebbd661ffdcdb7b08e4f1f06f6c7e3 README.md
|
| 4 |
+
a568f2ebc73cec3fd74ba2afd992d4e945a8c7a9d851f9b66163aac834b7b859 USE_POLICY.md
|
| 5 |
+
d9fb1883e3b313fe5630e405c0dab043ae34ca43f4dddcdae8b4aa03250fb659 base_origin.json
|
| 6 |
+
e10ca381b1ccc5cf9db52e371f3b6651576caee0a630b452e2816b2d404d4b65 chat_template.jinja
|
| 7 |
+
a062684555a22099be904c68cadf77d47163ba5d338818ef1cb4dfe3f65dca45 config.json
|
| 8 |
+
72b038eb2dd906df9d8efaf5d637a844840fc2547c1a2f2dffa13644d488adac examples/histories.jsonl
|
| 9 |
+
1f6c86163f3c793983fa34a395a10f0abe467129ef2fd9b358a9a23159f7b050 examples/replies.jsonl
|
| 10 |
+
38128b8dd64a43ad949bdedab3935aa747fa21a12eb3272f6c3571dd9f45a7b7 generate_reply.py
|
| 11 |
+
b452069fbf8cd44141ba63940eccbc9cf2d9335a81ad220aee76cef186a0e043 generation_config.json
|
| 12 |
+
5321ca97dd0968a3e2b676b3a42728e9f5327d516bcf0addd4e9cd61c068a1ad model-00001-of-00009.safetensors
|
| 13 |
+
9f2f977f18ff6e1c27e3b9b075b81569a29139e506d37a5e967d88c9092bdca5 model-00002-of-00009.safetensors
|
| 14 |
+
29fe41a97298df4a89210c491dc677f95823f8d30460e25755f540fcebb1e8e6 model-00003-of-00009.safetensors
|
| 15 |
+
dd9ac46bf5875801e7401a43c007b015b6bf7d9f296bdb18a19dba297e0dfa84 model-00004-of-00009.safetensors
|
| 16 |
+
141b2a10d73d5414dc61941047b6dc1b7e67ad4451ab56e3a2d134e8edfc14f6 model-00005-of-00009.safetensors
|
| 17 |
+
34eb49dc4a71246984d1e75ccdf769039fc72d7e21ead85cfde8a247462d130a model-00006-of-00009.safetensors
|
| 18 |
+
a88425021ba48d7357f9f8bc11a605b2ea537fdb18ca5c473bd3b80e87bfac81 model-00007-of-00009.safetensors
|
| 19 |
+
b338e95a44b4bb9ccef8285598c1c5a84df9e226d413d9f40e1bdd05cdfe7f3b model-00008-of-00009.safetensors
|
| 20 |
+
91f6aca2ef1ff613c4115732f954a7b2386d224dfaa34a05267c5688441ea187 model-00009-of-00009.safetensors
|
| 21 |
+
c49ba15dec192c441e0cdbc85bc92c84b736ca83b7a1d0644c669f5ce7dc88fd model.safetensors.index.json
|
| 22 |
+
338ccf69cc3501c68ac17595e7206fbc8c53ab700bd8f8ab051ccd1ed879786b requirements.txt
|
| 23 |
+
6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b tokenizer.json
|
| 24 |
+
ddd831ba480741780485607847b50a2d648d7449d575180cd1ffcd9f8203ebaf tokenizer_config.json
|
| 25 |
+
9aecb1c4cbf85235eb31630b030fc8b7876b5fc05bf4d436b4ef8a5728b74459 training_summary.json
|
| 26 |
+
a009db377f74bb5f9369bab7dafc08c8ff1a4d3495023502ac860d6edf2b044f validation.json
|
USE_POLICY.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Llama 3.1 Acceptable Use Policy
|
| 2 |
+
|
| 3 |
+
Meta is committed to promoting safe and fair use of its tools and features, including Llama 3.1. If you
|
| 4 |
+
access or use Llama 3.1, you agree to this Acceptable Use Policy (“Policy”). The most recent copy of
|
| 5 |
+
this policy can be found at [https://llama.meta.com/llama3_1/use-policy](https://llama.meta.com/llama3_1/use-policy)
|
| 6 |
+
|
| 7 |
+
## Prohibited Uses
|
| 8 |
+
|
| 9 |
+
We want everyone to use Llama 3.1 safely and responsibly. You agree you will not use, or allow
|
| 10 |
+
others to use, Llama 3.1 to:
|
| 11 |
+
|
| 12 |
+
1. Violate the law or others’ rights, including to:
|
| 13 |
+
1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
|
| 14 |
+
1. Violence or terrorism
|
| 15 |
+
2. Exploitation or harm to children, including the solicitation, creation, acquisition, or dissemination of child exploitative content or failure to report Child Sexual Abuse Material
|
| 16 |
+
3. Human trafficking, exploitation, and sexual violence
|
| 17 |
+
4. The illegal distribution of information or materials to minors, including obscene materials, or failure to employ legally required age-gating in connection with such information or materials.
|
| 18 |
+
5. Sexual solicitation
|
| 19 |
+
6. Any other criminal activity
|
| 20 |
+
3. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
|
| 21 |
+
4. Engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, other economic benefits, or other essential goods and services
|
| 22 |
+
5. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
|
| 23 |
+
6. Collect, process, disclose, generate, or infer health, demographic, or other sensitive personal or private information about individuals without rights and consents required by applicable laws
|
| 24 |
+
7. Engage in or facilitate any action or generate any content that infringes, misappropriates, or otherwise violates any third-party rights, including the outputs or results of any products or services using the Llama Materials
|
| 25 |
+
8. Create, generate, or facilitate the creation of malicious code, malware, computer viruses or do anything else that could disable, overburden, interfere with or impair the proper working, integrity, operation or appearance of a website or computer system
|
| 26 |
+
|
| 27 |
+
2. Engage in, promote, incite, facilitate, or assist in the planning or development of activities that present a risk of death or bodily harm to individuals, including use of Llama 3.1 related to the following:
|
| 28 |
+
1. Military, warfare, nuclear industries or applications, espionage, use for materials or activities that are subject to the International Traffic Arms Regulations (ITAR) maintained by the United States Department of State
|
| 29 |
+
2. Guns and illegal weapons (including weapon development)
|
| 30 |
+
3. Illegal drugs and regulated/controlled substances
|
| 31 |
+
4. Operation of critical infrastructure, transportation technologies, or heavy machinery
|
| 32 |
+
5. Self-harm or harm to others, including suicide, cutting, and eating disorders
|
| 33 |
+
6. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
|
| 34 |
+
|
| 35 |
+
3. Intentionally deceive or mislead others, including use of Llama 3.1 related to the following:
|
| 36 |
+
1. Generating, promoting, or furthering fraud or the creation or promotion of disinformation
|
| 37 |
+
2. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content
|
| 38 |
+
3. Generating, promoting, or further distributing spam
|
| 39 |
+
4. Impersonating another individual without consent, authorization, or legal right
|
| 40 |
+
5. Representing that the use of Llama 3.1 or outputs are human-generated
|
| 41 |
+
6. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
|
| 42 |
+
|
| 43 |
+
4. Fail to appropriately disclose to end users any known dangers of your AI system
|
| 44 |
+
|
| 45 |
+
Please report any violation of this Policy, software “bug,” or other problems that could lead to a violation
|
| 46 |
+
of this Policy through one of the following means:
|
| 47 |
+
|
| 48 |
+
* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)
|
| 49 |
+
* Reporting risky content generated by the model: developers.facebook.com/llama_output_feedback
|
| 50 |
+
* Reporting bugs and security concerns: facebook.com/whitehat/info
|
| 51 |
+
* Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama 3.1: LlamaUseReport@meta.com
|
base_origin.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"repo": "meta-llama/Llama-3.1-8B-Instruct",
|
| 3 |
+
"revision": "0e9e39f249a16976918f6564b8830bc894c89659"
|
| 4 |
+
}
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{{- bos_token }}
|
| 2 |
+
{%- if custom_tools is defined %}
|
| 3 |
+
{%- set tools = custom_tools %}
|
| 4 |
+
{%- endif %}
|
| 5 |
+
{%- if not tools_in_user_message is defined %}
|
| 6 |
+
{%- set tools_in_user_message = true %}
|
| 7 |
+
{%- endif %}
|
| 8 |
+
{%- if not date_string is defined %}
|
| 9 |
+
{%- set date_string = "26 Jul 2024" %}
|
| 10 |
+
{%- endif %}
|
| 11 |
+
{%- if not tools is defined %}
|
| 12 |
+
{%- set tools = none %}
|
| 13 |
+
{%- endif %}
|
| 14 |
+
|
| 15 |
+
{#- This block extracts the system message, so we can slot it into the right place. #}
|
| 16 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 17 |
+
{%- set system_message = messages[0]['content']|trim %}
|
| 18 |
+
{%- set messages = messages[1:] %}
|
| 19 |
+
{%- else %}
|
| 20 |
+
{%- set system_message = "" %}
|
| 21 |
+
{%- endif %}
|
| 22 |
+
|
| 23 |
+
{#- System message + builtin tools #}
|
| 24 |
+
{{- "<|start_header_id|>system<|end_header_id|>\n\n" }}
|
| 25 |
+
{%- if builtin_tools is defined or tools is not none %}
|
| 26 |
+
{{- "Environment: ipython\n" }}
|
| 27 |
+
{%- endif %}
|
| 28 |
+
{%- if builtin_tools is defined %}
|
| 29 |
+
{{- "Tools: " + builtin_tools | reject('equalto', 'code_interpreter') | join(", ") + "\n\n"}}
|
| 30 |
+
{%- endif %}
|
| 31 |
+
{{- "Cutting Knowledge Date: December 2023\n" }}
|
| 32 |
+
{{- "Today Date: " + date_string + "\n\n" }}
|
| 33 |
+
{%- if tools is not none and not tools_in_user_message %}
|
| 34 |
+
{{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
|
| 35 |
+
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
| 36 |
+
{{- "Do not use variables.\n\n" }}
|
| 37 |
+
{%- for t in tools %}
|
| 38 |
+
{{- t | tojson(indent=4) }}
|
| 39 |
+
{{- "\n\n" }}
|
| 40 |
+
{%- endfor %}
|
| 41 |
+
{%- endif %}
|
| 42 |
+
{{- system_message }}
|
| 43 |
+
{{- "<|eot_id|>" }}
|
| 44 |
+
|
| 45 |
+
{#- Custom tools are passed in a user message with some extra guidance #}
|
| 46 |
+
{%- if tools_in_user_message and not tools is none %}
|
| 47 |
+
{#- Extract the first user message so we can plug it in here #}
|
| 48 |
+
{%- if messages | length != 0 %}
|
| 49 |
+
{%- set first_user_message = messages[0]['content']|trim %}
|
| 50 |
+
{%- set messages = messages[1:] %}
|
| 51 |
+
{%- else %}
|
| 52 |
+
{{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
|
| 53 |
+
{%- endif %}
|
| 54 |
+
{{- '<|start_header_id|>user<|end_header_id|>\n\n' -}}
|
| 55 |
+
{{- "Given the following functions, please respond with a JSON for a function call " }}
|
| 56 |
+
{{- "with its proper arguments that best answers the given prompt.\n\n" }}
|
| 57 |
+
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
| 58 |
+
{{- "Do not use variables.\n\n" }}
|
| 59 |
+
{%- for t in tools %}
|
| 60 |
+
{{- t | tojson(indent=4) }}
|
| 61 |
+
{{- "\n\n" }}
|
| 62 |
+
{%- endfor %}
|
| 63 |
+
{{- first_user_message + "<|eot_id|>"}}
|
| 64 |
+
{%- endif %}
|
| 65 |
+
|
| 66 |
+
{%- for message in messages %}
|
| 67 |
+
{%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
|
| 68 |
+
{{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }}
|
| 69 |
+
{%- elif 'tool_calls' in message %}
|
| 70 |
+
{%- if not message.tool_calls|length == 1 %}
|
| 71 |
+
{{- raise_exception("This model only supports single tool-calls at once!") }}
|
| 72 |
+
{%- endif %}
|
| 73 |
+
{%- set tool_call = message.tool_calls[0].function %}
|
| 74 |
+
{%- if builtin_tools is defined and tool_call.name in builtin_tools %}
|
| 75 |
+
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
| 76 |
+
{{- "<|python_tag|>" + tool_call.name + ".call(" }}
|
| 77 |
+
{%- for arg_name, arg_val in tool_call.arguments | items %}
|
| 78 |
+
{{- arg_name + '="' + arg_val + '"' }}
|
| 79 |
+
{%- if not loop.last %}
|
| 80 |
+
{{- ", " }}
|
| 81 |
+
{%- endif %}
|
| 82 |
+
{%- endfor %}
|
| 83 |
+
{{- ")" }}
|
| 84 |
+
{%- else %}
|
| 85 |
+
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
| 86 |
+
{{- '{"name": "' + tool_call.name + '", ' }}
|
| 87 |
+
{{- '"parameters": ' }}
|
| 88 |
+
{{- tool_call.arguments | tojson }}
|
| 89 |
+
{{- "}" }}
|
| 90 |
+
{%- endif %}
|
| 91 |
+
{%- if builtin_tools is defined %}
|
| 92 |
+
{#- This means we're in ipython mode #}
|
| 93 |
+
{{- "<|eom_id|>" }}
|
| 94 |
+
{%- else %}
|
| 95 |
+
{{- "<|eot_id|>" }}
|
| 96 |
+
{%- endif %}
|
| 97 |
+
{%- elif message.role == "tool" or message.role == "ipython" %}
|
| 98 |
+
{{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }}
|
| 99 |
+
{%- if message.content is mapping or message.content is iterable %}
|
| 100 |
+
{{- message.content | tojson }}
|
| 101 |
+
{%- else %}
|
| 102 |
+
{{- message.content }}
|
| 103 |
+
{%- endif %}
|
| 104 |
+
{{- "<|eot_id|>" }}
|
| 105 |
+
{%- endif %}
|
| 106 |
+
{%- endfor %}
|
| 107 |
+
{%- if add_generation_prompt %}
|
| 108 |
+
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
|
| 109 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 128000,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": [
|
| 10 |
+
128001,
|
| 11 |
+
128008,
|
| 12 |
+
128009
|
| 13 |
+
],
|
| 14 |
+
"head_dim": 128,
|
| 15 |
+
"hidden_act": "silu",
|
| 16 |
+
"hidden_size": 4096,
|
| 17 |
+
"initializer_range": 0.02,
|
| 18 |
+
"intermediate_size": 14336,
|
| 19 |
+
"max_position_embeddings": 131072,
|
| 20 |
+
"mlp_bias": false,
|
| 21 |
+
"model_type": "llama",
|
| 22 |
+
"num_attention_heads": 32,
|
| 23 |
+
"num_hidden_layers": 32,
|
| 24 |
+
"num_key_value_heads": 8,
|
| 25 |
+
"pad_token_id": null,
|
| 26 |
+
"pretraining_tp": 1,
|
| 27 |
+
"rms_norm_eps": 1e-05,
|
| 28 |
+
"rope_parameters": {
|
| 29 |
+
"factor": 8.0,
|
| 30 |
+
"high_freq_factor": 4.0,
|
| 31 |
+
"low_freq_factor": 1.0,
|
| 32 |
+
"original_max_position_embeddings": 8192,
|
| 33 |
+
"rope_theta": 500000.0,
|
| 34 |
+
"rope_type": "llama3"
|
| 35 |
+
},
|
| 36 |
+
"tie_word_embeddings": false,
|
| 37 |
+
"transformers_version": "5.13.0",
|
| 38 |
+
"use_cache": true,
|
| 39 |
+
"vocab_size": 128256
|
| 40 |
+
}
|
examples/histories.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"id": "synthetic-anxiety", "history": "client:最近快考试了,我总担心考不好,晚上也睡不着。\ncounselor:考试的压力似乎让你一直很紧张。\nclient:是的,一躺下就忍不住想最坏的结果。"}
|
| 2 |
+
{"id": "synthetic-interpersonal", "history": "client:最近朋友很少主动联系我,我总觉得自己不重要。\ncounselor:你似乎很在意自己在这段友谊中的位置。\nclient:嗯,但我也不敢问,怕别人觉得我太黏人。"}
|
| 3 |
+
{"id": "synthetic-work", "history": "client:刚换了一份工作,我觉得自己什么都做不好。\ncounselor:面对新的工作要求,你好像对自己有很多怀疑。\nclient:是的,每次遇到不会的事情,我就觉得他们一定后悔招了我。"}
|
examples/replies.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"id": "synthetic-anxiety", "history": "client:最近快考试了,我总担心考不好,晚上也睡不着。\ncounselor:考试的压力似乎让你一直很紧张。\nclient:是的,一躺下就忍不住想最坏的结果。", "response": "这种“最坏结果”的念头通常会在什么时候冒出来?"}
|
| 2 |
+
{"id": "synthetic-interpersonal", "history": "client:最近朋友很少主动联系我,我总觉得自己不重要。\ncounselor:你似乎很在意自己在这段友谊中的位置。\nclient:嗯,但我也不敢问,怕别人觉得我太黏人。", "response": "我们可以先不急着判断“是不是太黏”,而是看看你在这段关系里最想得到的是什么,以及怎样表达会比较安全。"}
|
| 3 |
+
{"id": "synthetic-work", "history": "client:刚换了一份工作,我觉得自己什么都做不好。\ncounselor:面对新的工作要求,你好像对自己有很多怀疑。\nclient:是的,每次遇到不会的事情,我就觉得他们一定后悔招了我。", "response": "这种“他们后悔招我”的想法,通常是在什么场景里最容易冒出来?"}
|
generate_reply.py
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Generate the next Chinese counselor reply with the complete CounselTrajLM model."""
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
import json
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
import torch
|
| 8 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
REPO_ID = "UEC-InabaLab/Llama-3.1-8B-CounselTrajLM"
|
| 12 |
+
SYSTEM_PROMPT = (
|
| 13 |
+
"你是一名专业、温和、自然的线上心理咨询师。"
|
| 14 |
+
"请根据对话历史生成下一句咨询师回复。"
|
| 15 |
+
"回复只写咨询师要说的话,不要写说话人名称,不要写对话标签。"
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def build_prompt(tokenizer, history):
|
| 20 |
+
messages = [
|
| 21 |
+
{"role": "system", "content": SYSTEM_PROMPT},
|
| 22 |
+
{
|
| 23 |
+
"role": "user",
|
| 24 |
+
"content": f"对话历史:\n{history[-1800:]}\n\n请生成下一句咨询师回复。",
|
| 25 |
+
},
|
| 26 |
+
]
|
| 27 |
+
return tokenizer.apply_chat_template(
|
| 28 |
+
messages,
|
| 29 |
+
tokenize=False,
|
| 30 |
+
add_generation_prompt=True,
|
| 31 |
+
)
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def load_model(model_id=REPO_ID, local_files_only=False):
|
| 35 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, local_files_only=local_files_only)
|
| 36 |
+
if tokenizer.pad_token_id is None:
|
| 37 |
+
tokenizer.pad_token = tokenizer.eos_token
|
| 38 |
+
kwargs = {
|
| 39 |
+
"dtype": torch.bfloat16,
|
| 40 |
+
"device_map": "auto",
|
| 41 |
+
"attn_implementation": "sdpa",
|
| 42 |
+
"local_files_only": local_files_only,
|
| 43 |
+
}
|
| 44 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, **kwargs)
|
| 45 |
+
model.eval()
|
| 46 |
+
return tokenizer, model
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def generate_reply(tokenizer, model, history, max_new_tokens=256):
|
| 50 |
+
prompt = build_prompt(tokenizer, history)
|
| 51 |
+
inputs = tokenizer(
|
| 52 |
+
prompt,
|
| 53 |
+
return_tensors="pt",
|
| 54 |
+
add_special_tokens=False,
|
| 55 |
+
truncation=True,
|
| 56 |
+
max_length=2048,
|
| 57 |
+
).to(model.device)
|
| 58 |
+
with torch.inference_mode():
|
| 59 |
+
output = model.generate(
|
| 60 |
+
**inputs,
|
| 61 |
+
max_new_tokens=max_new_tokens,
|
| 62 |
+
do_sample=False,
|
| 63 |
+
repetition_penalty=1.05,
|
| 64 |
+
pad_token_id=tokenizer.pad_token_id,
|
| 65 |
+
eos_token_id=model.generation_config.eos_token_id or tokenizer.eos_token_id,
|
| 66 |
+
)
|
| 67 |
+
return tokenizer.decode(
|
| 68 |
+
output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True
|
| 69 |
+
).strip()
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
def main():
|
| 73 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 74 |
+
parser.add_argument("--model", "--adapter", dest="model", default=REPO_ID)
|
| 75 |
+
parser.add_argument("--history")
|
| 76 |
+
parser.add_argument("--input-file", type=Path)
|
| 77 |
+
parser.add_argument("--output-file", type=Path)
|
| 78 |
+
parser.add_argument("--max-new-tokens", type=int, default=256)
|
| 79 |
+
parser.add_argument("--local-files-only", action="store_true")
|
| 80 |
+
args = parser.parse_args()
|
| 81 |
+
if bool(args.history) == bool(args.input_file):
|
| 82 |
+
parser.error("Provide exactly one of --history or --input-file")
|
| 83 |
+
rows = [{"id": "example", "history": args.history}] if args.history else [
|
| 84 |
+
json.loads(line)
|
| 85 |
+
for line in args.input_file.read_text(encoding="utf-8").splitlines()
|
| 86 |
+
if line.strip()
|
| 87 |
+
]
|
| 88 |
+
if not rows or any(not isinstance(row.get("history"), str) or not row["history"].strip() for row in rows):
|
| 89 |
+
parser.error("Every input row must contain a nonempty history string")
|
| 90 |
+
tokenizer, model = load_model(
|
| 91 |
+
args.model,
|
| 92 |
+
local_files_only=args.local_files_only,
|
| 93 |
+
)
|
| 94 |
+
results = []
|
| 95 |
+
for row in rows:
|
| 96 |
+
reply = generate_reply(tokenizer, model, row["history"], args.max_new_tokens)
|
| 97 |
+
if not reply:
|
| 98 |
+
raise RuntimeError("Empty reply for input " + str(row.get("id", "")))
|
| 99 |
+
result = {"id": row.get("id", ""), "history": row["history"], "response": reply}
|
| 100 |
+
results.append(result)
|
| 101 |
+
print(json.dumps(result, ensure_ascii=False), flush=True)
|
| 102 |
+
if args.output_file:
|
| 103 |
+
args.output_file.parent.mkdir(parents=True, exist_ok=True)
|
| 104 |
+
args.output_file.write_text(
|
| 105 |
+
"".join(json.dumps(row, ensure_ascii=False) + "\n" for row in results),
|
| 106 |
+
encoding="utf-8",
|
| 107 |
+
)
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
if __name__ == "__main__":
|
| 111 |
+
main()
|
generation_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 128000,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
128001,
|
| 6 |
+
128008,
|
| 7 |
+
128009
|
| 8 |
+
],
|
| 9 |
+
"temperature": 0.6,
|
| 10 |
+
"top_p": 0.9,
|
| 11 |
+
"transformers_version": "5.13.0"
|
| 12 |
+
}
|
model-00001-of-00009.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5321ca97dd0968a3e2b676b3a42728e9f5327d516bcf0addd4e9cd61c068a1ad
|
| 3 |
+
size 1050673280
|
model-00002-of-00009.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9f2f977f18ff6e1c27e3b9b075b81569a29139e506d37a5e967d88c9092bdca5
|
| 3 |
+
size 1923131680
|
model-00003-of-00009.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:29fe41a97298df4a89210c491dc677f95823f8d30460e25755f540fcebb1e8e6
|
| 3 |
+
size 1979781416
|
model-00004-of-00009.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dd9ac46bf5875801e7401a43c007b015b6bf7d9f296bdb18a19dba297e0dfa84
|
| 3 |
+
size 1946243944
|
model-00005-of-00009.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:141b2a10d73d5414dc61941047b6dc1b7e67ad4451ab56e3a2d134e8edfc14f6
|
| 3 |
+
size 1979781456
|
model-00006-of-00009.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:34eb49dc4a71246984d1e75ccdf769039fc72d7e21ead85cfde8a247462d130a
|
| 3 |
+
size 1946243992
|
model-00007-of-00009.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a88425021ba48d7357f9f8bc11a605b2ea537fdb18ca5c473bd3b80e87bfac81
|
| 3 |
+
size 1979781456
|
model-00008-of-00009.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b338e95a44b4bb9ccef8285598c1c5a84df9e226d413d9f40e1bdd05cdfe7f3b
|
| 3 |
+
size 1946243992
|
model-00009-of-00009.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:91f6aca2ef1ff613c4115732f954a7b2386d224dfaa34a05267c5688441ea187
|
| 3 |
+
size 1308675128
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_parameters": 8030261248,
|
| 4 |
+
"total_size": 16060522496
|
| 5 |
+
},
|
| 6 |
+
"weight_map": {
|
| 7 |
+
"lm_head.weight": "model-00001-of-00009.safetensors",
|
| 8 |
+
"model.embed_tokens.weight": "model-00002-of-00009.safetensors",
|
| 9 |
+
"model.layers.0.input_layernorm.weight": "model-00002-of-00009.safetensors",
|
| 10 |
+
"model.layers.0.mlp.down_proj.weight": "model-00002-of-00009.safetensors",
|
| 11 |
+
"model.layers.0.mlp.gate_proj.weight": "model-00002-of-00009.safetensors",
|
| 12 |
+
"model.layers.0.mlp.up_proj.weight": "model-00002-of-00009.safetensors",
|
| 13 |
+
"model.layers.0.post_attention_layernorm.weight": "model-00002-of-00009.safetensors",
|
| 14 |
+
"model.layers.0.self_attn.k_proj.weight": "model-00002-of-00009.safetensors",
|
| 15 |
+
"model.layers.0.self_attn.o_proj.weight": "model-00002-of-00009.safetensors",
|
| 16 |
+
"model.layers.0.self_attn.q_proj.weight": "model-00002-of-00009.safetensors",
|
| 17 |
+
"model.layers.0.self_attn.v_proj.weight": "model-00002-of-00009.safetensors",
|
| 18 |
+
"model.layers.1.input_layernorm.weight": "model-00002-of-00009.safetensors",
|
| 19 |
+
"model.layers.1.mlp.down_proj.weight": "model-00002-of-00009.safetensors",
|
| 20 |
+
"model.layers.1.mlp.gate_proj.weight": "model-00002-of-00009.safetensors",
|
| 21 |
+
"model.layers.1.mlp.up_proj.weight": "model-00002-of-00009.safetensors",
|
| 22 |
+
"model.layers.1.post_attention_layernorm.weight": "model-00002-of-00009.safetensors",
|
| 23 |
+
"model.layers.1.self_attn.k_proj.weight": "model-00002-of-00009.safetensors",
|
| 24 |
+
"model.layers.1.self_attn.o_proj.weight": "model-00002-of-00009.safetensors",
|
| 25 |
+
"model.layers.1.self_attn.q_proj.weight": "model-00002-of-00009.safetensors",
|
| 26 |
+
"model.layers.1.self_attn.v_proj.weight": "model-00002-of-00009.safetensors",
|
| 27 |
+
"model.layers.10.input_layernorm.weight": "model-00004-of-00009.safetensors",
|
| 28 |
+
"model.layers.10.mlp.down_proj.weight": "model-00004-of-00009.safetensors",
|
| 29 |
+
"model.layers.10.mlp.gate_proj.weight": "model-00004-of-00009.safetensors",
|
| 30 |
+
"model.layers.10.mlp.up_proj.weight": "model-00004-of-00009.safetensors",
|
| 31 |
+
"model.layers.10.post_attention_layernorm.weight": "model-00004-of-00009.safetensors",
|
| 32 |
+
"model.layers.10.self_attn.k_proj.weight": "model-00004-of-00009.safetensors",
|
| 33 |
+
"model.layers.10.self_attn.o_proj.weight": "model-00004-of-00009.safetensors",
|
| 34 |
+
"model.layers.10.self_attn.q_proj.weight": "model-00004-of-00009.safetensors",
|
| 35 |
+
"model.layers.10.self_attn.v_proj.weight": "model-00004-of-00009.safetensors",
|
| 36 |
+
"model.layers.11.input_layernorm.weight": "model-00004-of-00009.safetensors",
|
| 37 |
+
"model.layers.11.mlp.down_proj.weight": "model-00005-of-00009.safetensors",
|
| 38 |
+
"model.layers.11.mlp.gate_proj.weight": "model-00005-of-00009.safetensors",
|
| 39 |
+
"model.layers.11.mlp.up_proj.weight": "model-00005-of-00009.safetensors",
|
| 40 |
+
"model.layers.11.post_attention_layernorm.weight": "model-00005-of-00009.safetensors",
|
| 41 |
+
"model.layers.11.self_attn.k_proj.weight": "model-00005-of-00009.safetensors",
|
| 42 |
+
"model.layers.11.self_attn.o_proj.weight": "model-00005-of-00009.safetensors",
|
| 43 |
+
"model.layers.11.self_attn.q_proj.weight": "model-00005-of-00009.safetensors",
|
| 44 |
+
"model.layers.11.self_attn.v_proj.weight": "model-00005-of-00009.safetensors",
|
| 45 |
+
"model.layers.12.input_layernorm.weight": "model-00005-of-00009.safetensors",
|
| 46 |
+
"model.layers.12.mlp.down_proj.weight": "model-00005-of-00009.safetensors",
|
| 47 |
+
"model.layers.12.mlp.gate_proj.weight": "model-00005-of-00009.safetensors",
|
| 48 |
+
"model.layers.12.mlp.up_proj.weight": "model-00005-of-00009.safetensors",
|
| 49 |
+
"model.layers.12.post_attention_layernorm.weight": "model-00005-of-00009.safetensors",
|
| 50 |
+
"model.layers.12.self_attn.k_proj.weight": "model-00005-of-00009.safetensors",
|
| 51 |
+
"model.layers.12.self_attn.o_proj.weight": "model-00005-of-00009.safetensors",
|
| 52 |
+
"model.layers.12.self_attn.q_proj.weight": "model-00005-of-00009.safetensors",
|
| 53 |
+
"model.layers.12.self_attn.v_proj.weight": "model-00005-of-00009.safetensors",
|
| 54 |
+
"model.layers.13.input_layernorm.weight": "model-00005-of-00009.safetensors",
|
| 55 |
+
"model.layers.13.mlp.down_proj.weight": "model-00005-of-00009.safetensors",
|
| 56 |
+
"model.layers.13.mlp.gate_proj.weight": "model-00005-of-00009.safetensors",
|
| 57 |
+
"model.layers.13.mlp.up_proj.weight": "model-00005-of-00009.safetensors",
|
| 58 |
+
"model.layers.13.post_attention_layernorm.weight": "model-00005-of-00009.safetensors",
|
| 59 |
+
"model.layers.13.self_attn.k_proj.weight": "model-00005-of-00009.safetensors",
|
| 60 |
+
"model.layers.13.self_attn.o_proj.weight": "model-00005-of-00009.safetensors",
|
| 61 |
+
"model.layers.13.self_attn.q_proj.weight": "model-00005-of-00009.safetensors",
|
| 62 |
+
"model.layers.13.self_attn.v_proj.weight": "model-00005-of-00009.safetensors",
|
| 63 |
+
"model.layers.14.input_layernorm.weight": "model-00005-of-00009.safetensors",
|
| 64 |
+
"model.layers.14.mlp.down_proj.weight": "model-00005-of-00009.safetensors",
|
| 65 |
+
"model.layers.14.mlp.gate_proj.weight": "model-00005-of-00009.safetensors",
|
| 66 |
+
"model.layers.14.mlp.up_proj.weight": "model-00005-of-00009.safetensors",
|
| 67 |
+
"model.layers.14.post_attention_layernorm.weight": "model-00005-of-00009.safetensors",
|
| 68 |
+
"model.layers.14.self_attn.k_proj.weight": "model-00005-of-00009.safetensors",
|
| 69 |
+
"model.layers.14.self_attn.o_proj.weight": "model-00005-of-00009.safetensors",
|
| 70 |
+
"model.layers.14.self_attn.q_proj.weight": "model-00005-of-00009.safetensors",
|
| 71 |
+
"model.layers.14.self_attn.v_proj.weight": "model-00005-of-00009.safetensors",
|
| 72 |
+
"model.layers.15.input_layernorm.weight": "model-00005-of-00009.safetensors",
|
| 73 |
+
"model.layers.15.mlp.down_proj.weight": "model-00005-of-00009.safetensors",
|
| 74 |
+
"model.layers.15.mlp.gate_proj.weight": "model-00005-of-00009.safetensors",
|
| 75 |
+
"model.layers.15.mlp.up_proj.weight": "model-00006-of-00009.safetensors",
|
| 76 |
+
"model.layers.15.post_attention_layernorm.weight": "model-00006-of-00009.safetensors",
|
| 77 |
+
"model.layers.15.self_attn.k_proj.weight": "model-00006-of-00009.safetensors",
|
| 78 |
+
"model.layers.15.self_attn.o_proj.weight": "model-00006-of-00009.safetensors",
|
| 79 |
+
"model.layers.15.self_attn.q_proj.weight": "model-00006-of-00009.safetensors",
|
| 80 |
+
"model.layers.15.self_attn.v_proj.weight": "model-00006-of-00009.safetensors",
|
| 81 |
+
"model.layers.16.input_layernorm.weight": "model-00006-of-00009.safetensors",
|
| 82 |
+
"model.layers.16.mlp.down_proj.weight": "model-00006-of-00009.safetensors",
|
| 83 |
+
"model.layers.16.mlp.gate_proj.weight": "model-00006-of-00009.safetensors",
|
| 84 |
+
"model.layers.16.mlp.up_proj.weight": "model-00006-of-00009.safetensors",
|
| 85 |
+
"model.layers.16.post_attention_layernorm.weight": "model-00006-of-00009.safetensors",
|
| 86 |
+
"model.layers.16.self_attn.k_proj.weight": "model-00006-of-00009.safetensors",
|
| 87 |
+
"model.layers.16.self_attn.o_proj.weight": "model-00006-of-00009.safetensors",
|
| 88 |
+
"model.layers.16.self_attn.q_proj.weight": "model-00006-of-00009.safetensors",
|
| 89 |
+
"model.layers.16.self_attn.v_proj.weight": "model-00006-of-00009.safetensors",
|
| 90 |
+
"model.layers.17.input_layernorm.weight": "model-00006-of-00009.safetensors",
|
| 91 |
+
"model.layers.17.mlp.down_proj.weight": "model-00006-of-00009.safetensors",
|
| 92 |
+
"model.layers.17.mlp.gate_proj.weight": "model-00006-of-00009.safetensors",
|
| 93 |
+
"model.layers.17.mlp.up_proj.weight": "model-00006-of-00009.safetensors",
|
| 94 |
+
"model.layers.17.post_attention_layernorm.weight": "model-00006-of-00009.safetensors",
|
| 95 |
+
"model.layers.17.self_attn.k_proj.weight": "model-00006-of-00009.safetensors",
|
| 96 |
+
"model.layers.17.self_attn.o_proj.weight": "model-00006-of-00009.safetensors",
|
| 97 |
+
"model.layers.17.self_attn.q_proj.weight": "model-00006-of-00009.safetensors",
|
| 98 |
+
"model.layers.17.self_attn.v_proj.weight": "model-00006-of-00009.safetensors",
|
| 99 |
+
"model.layers.18.input_layernorm.weight": "model-00006-of-00009.safetensors",
|
| 100 |
+
"model.layers.18.mlp.down_proj.weight": "model-00006-of-00009.safetensors",
|
| 101 |
+
"model.layers.18.mlp.gate_proj.weight": "model-00006-of-00009.safetensors",
|
| 102 |
+
"model.layers.18.mlp.up_proj.weight": "model-00006-of-00009.safetensors",
|
| 103 |
+
"model.layers.18.post_attention_layernorm.weight": "model-00006-of-00009.safetensors",
|
| 104 |
+
"model.layers.18.self_attn.k_proj.weight": "model-00006-of-00009.safetensors",
|
| 105 |
+
"model.layers.18.self_attn.o_proj.weight": "model-00006-of-00009.safetensors",
|
| 106 |
+
"model.layers.18.self_attn.q_proj.weight": "model-00006-of-00009.safetensors",
|
| 107 |
+
"model.layers.18.self_attn.v_proj.weight": "model-00006-of-00009.safetensors",
|
| 108 |
+
"model.layers.19.input_layernorm.weight": "model-00006-of-00009.safetensors",
|
| 109 |
+
"model.layers.19.mlp.down_proj.weight": "model-00006-of-00009.safetensors",
|
| 110 |
+
"model.layers.19.mlp.gate_proj.weight": "model-00006-of-00009.safetensors",
|
| 111 |
+
"model.layers.19.mlp.up_proj.weight": "model-00006-of-00009.safetensors",
|
| 112 |
+
"model.layers.19.post_attention_layernorm.weight": "model-00006-of-00009.safetensors",
|
| 113 |
+
"model.layers.19.self_attn.k_proj.weight": "model-00006-of-00009.safetensors",
|
| 114 |
+
"model.layers.19.self_attn.o_proj.weight": "model-00006-of-00009.safetensors",
|
| 115 |
+
"model.layers.19.self_attn.q_proj.weight": "model-00006-of-00009.safetensors",
|
| 116 |
+
"model.layers.19.self_attn.v_proj.weight": "model-00006-of-00009.safetensors",
|
| 117 |
+
"model.layers.2.input_layernorm.weight": "model-00002-of-00009.safetensors",
|
| 118 |
+
"model.layers.2.mlp.down_proj.weight": "model-00003-of-00009.safetensors",
|
| 119 |
+
"model.layers.2.mlp.gate_proj.weight": "model-00003-of-00009.safetensors",
|
| 120 |
+
"model.layers.2.mlp.up_proj.weight": "model-00003-of-00009.safetensors",
|
| 121 |
+
"model.layers.2.post_attention_layernorm.weight": "model-00003-of-00009.safetensors",
|
| 122 |
+
"model.layers.2.self_attn.k_proj.weight": "model-00003-of-00009.safetensors",
|
| 123 |
+
"model.layers.2.self_attn.o_proj.weight": "model-00003-of-00009.safetensors",
|
| 124 |
+
"model.layers.2.self_attn.q_proj.weight": "model-00003-of-00009.safetensors",
|
| 125 |
+
"model.layers.2.self_attn.v_proj.weight": "model-00003-of-00009.safetensors",
|
| 126 |
+
"model.layers.20.input_layernorm.weight": "model-00006-of-00009.safetensors",
|
| 127 |
+
"model.layers.20.mlp.down_proj.weight": "model-00007-of-00009.safetensors",
|
| 128 |
+
"model.layers.20.mlp.gate_proj.weight": "model-00007-of-00009.safetensors",
|
| 129 |
+
"model.layers.20.mlp.up_proj.weight": "model-00007-of-00009.safetensors",
|
| 130 |
+
"model.layers.20.post_attention_layernorm.weight": "model-00007-of-00009.safetensors",
|
| 131 |
+
"model.layers.20.self_attn.k_proj.weight": "model-00007-of-00009.safetensors",
|
| 132 |
+
"model.layers.20.self_attn.o_proj.weight": "model-00007-of-00009.safetensors",
|
| 133 |
+
"model.layers.20.self_attn.q_proj.weight": "model-00007-of-00009.safetensors",
|
| 134 |
+
"model.layers.20.self_attn.v_proj.weight": "model-00007-of-00009.safetensors",
|
| 135 |
+
"model.layers.21.input_layernorm.weight": "model-00007-of-00009.safetensors",
|
| 136 |
+
"model.layers.21.mlp.down_proj.weight": "model-00007-of-00009.safetensors",
|
| 137 |
+
"model.layers.21.mlp.gate_proj.weight": "model-00007-of-00009.safetensors",
|
| 138 |
+
"model.layers.21.mlp.up_proj.weight": "model-00007-of-00009.safetensors",
|
| 139 |
+
"model.layers.21.post_attention_layernorm.weight": "model-00007-of-00009.safetensors",
|
| 140 |
+
"model.layers.21.self_attn.k_proj.weight": "model-00007-of-00009.safetensors",
|
| 141 |
+
"model.layers.21.self_attn.o_proj.weight": "model-00007-of-00009.safetensors",
|
| 142 |
+
"model.layers.21.self_attn.q_proj.weight": "model-00007-of-00009.safetensors",
|
| 143 |
+
"model.layers.21.self_attn.v_proj.weight": "model-00007-of-00009.safetensors",
|
| 144 |
+
"model.layers.22.input_layernorm.weight": "model-00007-of-00009.safetensors",
|
| 145 |
+
"model.layers.22.mlp.down_proj.weight": "model-00007-of-00009.safetensors",
|
| 146 |
+
"model.layers.22.mlp.gate_proj.weight": "model-00007-of-00009.safetensors",
|
| 147 |
+
"model.layers.22.mlp.up_proj.weight": "model-00007-of-00009.safetensors",
|
| 148 |
+
"model.layers.22.post_attention_layernorm.weight": "model-00007-of-00009.safetensors",
|
| 149 |
+
"model.layers.22.self_attn.k_proj.weight": "model-00007-of-00009.safetensors",
|
| 150 |
+
"model.layers.22.self_attn.o_proj.weight": "model-00007-of-00009.safetensors",
|
| 151 |
+
"model.layers.22.self_attn.q_proj.weight": "model-00007-of-00009.safetensors",
|
| 152 |
+
"model.layers.22.self_attn.v_proj.weight": "model-00007-of-00009.safetensors",
|
| 153 |
+
"model.layers.23.input_layernorm.weight": "model-00007-of-00009.safetensors",
|
| 154 |
+
"model.layers.23.mlp.down_proj.weight": "model-00007-of-00009.safetensors",
|
| 155 |
+
"model.layers.23.mlp.gate_proj.weight": "model-00007-of-00009.safetensors",
|
| 156 |
+
"model.layers.23.mlp.up_proj.weight": "model-00007-of-00009.safetensors",
|
| 157 |
+
"model.layers.23.post_attention_layernorm.weight": "model-00007-of-00009.safetensors",
|
| 158 |
+
"model.layers.23.self_attn.k_proj.weight": "model-00007-of-00009.safetensors",
|
| 159 |
+
"model.layers.23.self_attn.o_proj.weight": "model-00007-of-00009.safetensors",
|
| 160 |
+
"model.layers.23.self_attn.q_proj.weight": "model-00007-of-00009.safetensors",
|
| 161 |
+
"model.layers.23.self_attn.v_proj.weight": "model-00007-of-00009.safetensors",
|
| 162 |
+
"model.layers.24.input_layernorm.weight": "model-00007-of-00009.safetensors",
|
| 163 |
+
"model.layers.24.mlp.down_proj.weight": "model-00007-of-00009.safetensors",
|
| 164 |
+
"model.layers.24.mlp.gate_proj.weight": "model-00007-of-00009.safetensors",
|
| 165 |
+
"model.layers.24.mlp.up_proj.weight": "model-00008-of-00009.safetensors",
|
| 166 |
+
"model.layers.24.post_attention_layernorm.weight": "model-00008-of-00009.safetensors",
|
| 167 |
+
"model.layers.24.self_attn.k_proj.weight": "model-00008-of-00009.safetensors",
|
| 168 |
+
"model.layers.24.self_attn.o_proj.weight": "model-00008-of-00009.safetensors",
|
| 169 |
+
"model.layers.24.self_attn.q_proj.weight": "model-00008-of-00009.safetensors",
|
| 170 |
+
"model.layers.24.self_attn.v_proj.weight": "model-00008-of-00009.safetensors",
|
| 171 |
+
"model.layers.25.input_layernorm.weight": "model-00008-of-00009.safetensors",
|
| 172 |
+
"model.layers.25.mlp.down_proj.weight": "model-00008-of-00009.safetensors",
|
| 173 |
+
"model.layers.25.mlp.gate_proj.weight": "model-00008-of-00009.safetensors",
|
| 174 |
+
"model.layers.25.mlp.up_proj.weight": "model-00008-of-00009.safetensors",
|
| 175 |
+
"model.layers.25.post_attention_layernorm.weight": "model-00008-of-00009.safetensors",
|
| 176 |
+
"model.layers.25.self_attn.k_proj.weight": "model-00008-of-00009.safetensors",
|
| 177 |
+
"model.layers.25.self_attn.o_proj.weight": "model-00008-of-00009.safetensors",
|
| 178 |
+
"model.layers.25.self_attn.q_proj.weight": "model-00008-of-00009.safetensors",
|
| 179 |
+
"model.layers.25.self_attn.v_proj.weight": "model-00008-of-00009.safetensors",
|
| 180 |
+
"model.layers.26.input_layernorm.weight": "model-00008-of-00009.safetensors",
|
| 181 |
+
"model.layers.26.mlp.down_proj.weight": "model-00008-of-00009.safetensors",
|
| 182 |
+
"model.layers.26.mlp.gate_proj.weight": "model-00008-of-00009.safetensors",
|
| 183 |
+
"model.layers.26.mlp.up_proj.weight": "model-00008-of-00009.safetensors",
|
| 184 |
+
"model.layers.26.post_attention_layernorm.weight": "model-00008-of-00009.safetensors",
|
| 185 |
+
"model.layers.26.self_attn.k_proj.weight": "model-00008-of-00009.safetensors",
|
| 186 |
+
"model.layers.26.self_attn.o_proj.weight": "model-00008-of-00009.safetensors",
|
| 187 |
+
"model.layers.26.self_attn.q_proj.weight": "model-00008-of-00009.safetensors",
|
| 188 |
+
"model.layers.26.self_attn.v_proj.weight": "model-00008-of-00009.safetensors",
|
| 189 |
+
"model.layers.27.input_layernorm.weight": "model-00008-of-00009.safetensors",
|
| 190 |
+
"model.layers.27.mlp.down_proj.weight": "model-00008-of-00009.safetensors",
|
| 191 |
+
"model.layers.27.mlp.gate_proj.weight": "model-00008-of-00009.safetensors",
|
| 192 |
+
"model.layers.27.mlp.up_proj.weight": "model-00008-of-00009.safetensors",
|
| 193 |
+
"model.layers.27.post_attention_layernorm.weight": "model-00008-of-00009.safetensors",
|
| 194 |
+
"model.layers.27.self_attn.k_proj.weight": "model-00008-of-00009.safetensors",
|
| 195 |
+
"model.layers.27.self_attn.o_proj.weight": "model-00008-of-00009.safetensors",
|
| 196 |
+
"model.layers.27.self_attn.q_proj.weight": "model-00008-of-00009.safetensors",
|
| 197 |
+
"model.layers.27.self_attn.v_proj.weight": "model-00008-of-00009.safetensors",
|
| 198 |
+
"model.layers.28.input_layernorm.weight": "model-00008-of-00009.safetensors",
|
| 199 |
+
"model.layers.28.mlp.down_proj.weight": "model-00008-of-00009.safetensors",
|
| 200 |
+
"model.layers.28.mlp.gate_proj.weight": "model-00008-of-00009.safetensors",
|
| 201 |
+
"model.layers.28.mlp.up_proj.weight": "model-00008-of-00009.safetensors",
|
| 202 |
+
"model.layers.28.post_attention_layernorm.weight": "model-00008-of-00009.safetensors",
|
| 203 |
+
"model.layers.28.self_attn.k_proj.weight": "model-00008-of-00009.safetensors",
|
| 204 |
+
"model.layers.28.self_attn.o_proj.weight": "model-00008-of-00009.safetensors",
|
| 205 |
+
"model.layers.28.self_attn.q_proj.weight": "model-00008-of-00009.safetensors",
|
| 206 |
+
"model.layers.28.self_attn.v_proj.weight": "model-00008-of-00009.safetensors",
|
| 207 |
+
"model.layers.29.input_layernorm.weight": "model-00008-of-00009.safetensors",
|
| 208 |
+
"model.layers.29.mlp.down_proj.weight": "model-00009-of-00009.safetensors",
|
| 209 |
+
"model.layers.29.mlp.gate_proj.weight": "model-00009-of-00009.safetensors",
|
| 210 |
+
"model.layers.29.mlp.up_proj.weight": "model-00009-of-00009.safetensors",
|
| 211 |
+
"model.layers.29.post_attention_layernorm.weight": "model-00009-of-00009.safetensors",
|
| 212 |
+
"model.layers.29.self_attn.k_proj.weight": "model-00009-of-00009.safetensors",
|
| 213 |
+
"model.layers.29.self_attn.o_proj.weight": "model-00009-of-00009.safetensors",
|
| 214 |
+
"model.layers.29.self_attn.q_proj.weight": "model-00009-of-00009.safetensors",
|
| 215 |
+
"model.layers.29.self_attn.v_proj.weight": "model-00009-of-00009.safetensors",
|
| 216 |
+
"model.layers.3.input_layernorm.weight": "model-00003-of-00009.safetensors",
|
| 217 |
+
"model.layers.3.mlp.down_proj.weight": "model-00003-of-00009.safetensors",
|
| 218 |
+
"model.layers.3.mlp.gate_proj.weight": "model-00003-of-00009.safetensors",
|
| 219 |
+
"model.layers.3.mlp.up_proj.weight": "model-00003-of-00009.safetensors",
|
| 220 |
+
"model.layers.3.post_attention_layernorm.weight": "model-00003-of-00009.safetensors",
|
| 221 |
+
"model.layers.3.self_attn.k_proj.weight": "model-00003-of-00009.safetensors",
|
| 222 |
+
"model.layers.3.self_attn.o_proj.weight": "model-00003-of-00009.safetensors",
|
| 223 |
+
"model.layers.3.self_attn.q_proj.weight": "model-00003-of-00009.safetensors",
|
| 224 |
+
"model.layers.3.self_attn.v_proj.weight": "model-00003-of-00009.safetensors",
|
| 225 |
+
"model.layers.30.input_layernorm.weight": "model-00009-of-00009.safetensors",
|
| 226 |
+
"model.layers.30.mlp.down_proj.weight": "model-00009-of-00009.safetensors",
|
| 227 |
+
"model.layers.30.mlp.gate_proj.weight": "model-00009-of-00009.safetensors",
|
| 228 |
+
"model.layers.30.mlp.up_proj.weight": "model-00009-of-00009.safetensors",
|
| 229 |
+
"model.layers.30.post_attention_layernorm.weight": "model-00009-of-00009.safetensors",
|
| 230 |
+
"model.layers.30.self_attn.k_proj.weight": "model-00009-of-00009.safetensors",
|
| 231 |
+
"model.layers.30.self_attn.o_proj.weight": "model-00009-of-00009.safetensors",
|
| 232 |
+
"model.layers.30.self_attn.q_proj.weight": "model-00009-of-00009.safetensors",
|
| 233 |
+
"model.layers.30.self_attn.v_proj.weight": "model-00009-of-00009.safetensors",
|
| 234 |
+
"model.layers.31.input_layernorm.weight": "model-00009-of-00009.safetensors",
|
| 235 |
+
"model.layers.31.mlp.down_proj.weight": "model-00009-of-00009.safetensors",
|
| 236 |
+
"model.layers.31.mlp.gate_proj.weight": "model-00009-of-00009.safetensors",
|
| 237 |
+
"model.layers.31.mlp.up_proj.weight": "model-00009-of-00009.safetensors",
|
| 238 |
+
"model.layers.31.post_attention_layernorm.weight": "model-00009-of-00009.safetensors",
|
| 239 |
+
"model.layers.31.self_attn.k_proj.weight": "model-00009-of-00009.safetensors",
|
| 240 |
+
"model.layers.31.self_attn.o_proj.weight": "model-00009-of-00009.safetensors",
|
| 241 |
+
"model.layers.31.self_attn.q_proj.weight": "model-00009-of-00009.safetensors",
|
| 242 |
+
"model.layers.31.self_attn.v_proj.weight": "model-00009-of-00009.safetensors",
|
| 243 |
+
"model.layers.4.input_layernorm.weight": "model-00003-of-00009.safetensors",
|
| 244 |
+
"model.layers.4.mlp.down_proj.weight": "model-00003-of-00009.safetensors",
|
| 245 |
+
"model.layers.4.mlp.gate_proj.weight": "model-00003-of-00009.safetensors",
|
| 246 |
+
"model.layers.4.mlp.up_proj.weight": "model-00003-of-00009.safetensors",
|
| 247 |
+
"model.layers.4.post_attention_layernorm.weight": "model-00003-of-00009.safetensors",
|
| 248 |
+
"model.layers.4.self_attn.k_proj.weight": "model-00003-of-00009.safetensors",
|
| 249 |
+
"model.layers.4.self_attn.o_proj.weight": "model-00003-of-00009.safetensors",
|
| 250 |
+
"model.layers.4.self_attn.q_proj.weight": "model-00003-of-00009.safetensors",
|
| 251 |
+
"model.layers.4.self_attn.v_proj.weight": "model-00003-of-00009.safetensors",
|
| 252 |
+
"model.layers.5.input_layernorm.weight": "model-00003-of-00009.safetensors",
|
| 253 |
+
"model.layers.5.mlp.down_proj.weight": "model-00003-of-00009.safetensors",
|
| 254 |
+
"model.layers.5.mlp.gate_proj.weight": "model-00003-of-00009.safetensors",
|
| 255 |
+
"model.layers.5.mlp.up_proj.weight": "model-00003-of-00009.safetensors",
|
| 256 |
+
"model.layers.5.post_attention_layernorm.weight": "model-00003-of-00009.safetensors",
|
| 257 |
+
"model.layers.5.self_attn.k_proj.weight": "model-00003-of-00009.safetensors",
|
| 258 |
+
"model.layers.5.self_attn.o_proj.weight": "model-00003-of-00009.safetensors",
|
| 259 |
+
"model.layers.5.self_attn.q_proj.weight": "model-00003-of-00009.safetensors",
|
| 260 |
+
"model.layers.5.self_attn.v_proj.weight": "model-00003-of-00009.safetensors",
|
| 261 |
+
"model.layers.6.input_layernorm.weight": "model-00003-of-00009.safetensors",
|
| 262 |
+
"model.layers.6.mlp.down_proj.weight": "model-00003-of-00009.safetensors",
|
| 263 |
+
"model.layers.6.mlp.gate_proj.weight": "model-00003-of-00009.safetensors",
|
| 264 |
+
"model.layers.6.mlp.up_proj.weight": "model-00004-of-00009.safetensors",
|
| 265 |
+
"model.layers.6.post_attention_layernorm.weight": "model-00004-of-00009.safetensors",
|
| 266 |
+
"model.layers.6.self_attn.k_proj.weight": "model-00004-of-00009.safetensors",
|
| 267 |
+
"model.layers.6.self_attn.o_proj.weight": "model-00004-of-00009.safetensors",
|
| 268 |
+
"model.layers.6.self_attn.q_proj.weight": "model-00004-of-00009.safetensors",
|
| 269 |
+
"model.layers.6.self_attn.v_proj.weight": "model-00004-of-00009.safetensors",
|
| 270 |
+
"model.layers.7.input_layernorm.weight": "model-00004-of-00009.safetensors",
|
| 271 |
+
"model.layers.7.mlp.down_proj.weight": "model-00004-of-00009.safetensors",
|
| 272 |
+
"model.layers.7.mlp.gate_proj.weight": "model-00004-of-00009.safetensors",
|
| 273 |
+
"model.layers.7.mlp.up_proj.weight": "model-00004-of-00009.safetensors",
|
| 274 |
+
"model.layers.7.post_attention_layernorm.weight": "model-00004-of-00009.safetensors",
|
| 275 |
+
"model.layers.7.self_attn.k_proj.weight": "model-00004-of-00009.safetensors",
|
| 276 |
+
"model.layers.7.self_attn.o_proj.weight": "model-00004-of-00009.safetensors",
|
| 277 |
+
"model.layers.7.self_attn.q_proj.weight": "model-00004-of-00009.safetensors",
|
| 278 |
+
"model.layers.7.self_attn.v_proj.weight": "model-00004-of-00009.safetensors",
|
| 279 |
+
"model.layers.8.input_layernorm.weight": "model-00004-of-00009.safetensors",
|
| 280 |
+
"model.layers.8.mlp.down_proj.weight": "model-00004-of-00009.safetensors",
|
| 281 |
+
"model.layers.8.mlp.gate_proj.weight": "model-00004-of-00009.safetensors",
|
| 282 |
+
"model.layers.8.mlp.up_proj.weight": "model-00004-of-00009.safetensors",
|
| 283 |
+
"model.layers.8.post_attention_layernorm.weight": "model-00004-of-00009.safetensors",
|
| 284 |
+
"model.layers.8.self_attn.k_proj.weight": "model-00004-of-00009.safetensors",
|
| 285 |
+
"model.layers.8.self_attn.o_proj.weight": "model-00004-of-00009.safetensors",
|
| 286 |
+
"model.layers.8.self_attn.q_proj.weight": "model-00004-of-00009.safetensors",
|
| 287 |
+
"model.layers.8.self_attn.v_proj.weight": "model-00004-of-00009.safetensors",
|
| 288 |
+
"model.layers.9.input_layernorm.weight": "model-00004-of-00009.safetensors",
|
| 289 |
+
"model.layers.9.mlp.down_proj.weight": "model-00004-of-00009.safetensors",
|
| 290 |
+
"model.layers.9.mlp.gate_proj.weight": "model-00004-of-00009.safetensors",
|
| 291 |
+
"model.layers.9.mlp.up_proj.weight": "model-00004-of-00009.safetensors",
|
| 292 |
+
"model.layers.9.post_attention_layernorm.weight": "model-00004-of-00009.safetensors",
|
| 293 |
+
"model.layers.9.self_attn.k_proj.weight": "model-00004-of-00009.safetensors",
|
| 294 |
+
"model.layers.9.self_attn.o_proj.weight": "model-00004-of-00009.safetensors",
|
| 295 |
+
"model.layers.9.self_attn.q_proj.weight": "model-00004-of-00009.safetensors",
|
| 296 |
+
"model.layers.9.self_attn.v_proj.weight": "model-00004-of-00009.safetensors",
|
| 297 |
+
"model.norm.weight": "model-00009-of-00009.safetensors"
|
| 298 |
+
}
|
| 299 |
+
}
|
requirements.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
torch>=2.5.1
|
| 2 |
+
transformers==5.13.0
|
| 3 |
+
accelerate>=1.13
|
| 4 |
+
huggingface_hub>=0.34
|
| 5 |
+
safetensors>=0.8
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
|
| 3 |
+
size 17209920
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<|begin_of_text|>",
|
| 4 |
+
"clean_up_tokenization_spaces": true,
|
| 5 |
+
"eos_token": "<|eot_id|>",
|
| 6 |
+
"model_input_names": [
|
| 7 |
+
"input_ids",
|
| 8 |
+
"attention_mask"
|
| 9 |
+
],
|
| 10 |
+
"model_max_length": 131072,
|
| 11 |
+
"pad_token": "<|eot_id|>",
|
| 12 |
+
"tokenizer_class": "TokenizersBackend"
|
| 13 |
+
}
|
training_summary.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "Llama-3.1-8B-CounselTrajLM",
|
| 3 |
+
"base_model": "meta-llama/Llama-3.1-8B-Instruct",
|
| 4 |
+
"base_revision": "0e9e39f249a16976918f6564b8830bc894c89659",
|
| 5 |
+
"training_dataset": "CounselTrajD",
|
| 6 |
+
"split": "dialogue-disjoint 90/10 train/validation",
|
| 7 |
+
"train_examples": 425679,
|
| 8 |
+
"validation_examples": 47528,
|
| 9 |
+
"fine_tuning_method": "QLoRA",
|
| 10 |
+
"release_format": "adapter merged into unquantized BF16 base weights",
|
| 11 |
+
"learning_rate": 0.0002,
|
| 12 |
+
"epochs": 3,
|
| 13 |
+
"checkpoint_policy": "final_epoch",
|
| 14 |
+
"validation_role": "monitoring",
|
| 15 |
+
"lr_scheduler": "cosine",
|
| 16 |
+
"warmup_ratio": 0.06,
|
| 17 |
+
"effective_batch_size": 16,
|
| 18 |
+
"max_sequence_length": 2048,
|
| 19 |
+
"max_history_characters": 1800,
|
| 20 |
+
"seed": 20260704,
|
| 21 |
+
"global_step": 79815,
|
| 22 |
+
"lora": {
|
| 23 |
+
"rank": 32,
|
| 24 |
+
"alpha": 64,
|
| 25 |
+
"dropout": 0.05
|
| 26 |
+
},
|
| 27 |
+
"train_loss": 1.2695675833425537,
|
| 28 |
+
"validation_loss": 1.2191978693008423,
|
| 29 |
+
"license": "llama3.1"
|
| 30 |
+
}
|
validation.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "passed",
|
| 3 |
+
"format": "merged BF16 safetensors",
|
| 4 |
+
"tensor_count": 291,
|
| 5 |
+
"parameter_count": 8030261248,
|
| 6 |
+
"weight_shards": 9,
|
| 7 |
+
"weight_file_bytes": 16060556344,
|
| 8 |
+
"weight_sha256": {
|
| 9 |
+
"model-00001-of-00009.safetensors": "5321ca97dd0968a3e2b676b3a42728e9f5327d516bcf0addd4e9cd61c068a1ad",
|
| 10 |
+
"model-00002-of-00009.safetensors": "9f2f977f18ff6e1c27e3b9b075b81569a29139e506d37a5e967d88c9092bdca5",
|
| 11 |
+
"model-00003-of-00009.safetensors": "29fe41a97298df4a89210c491dc677f95823f8d30460e25755f540fcebb1e8e6",
|
| 12 |
+
"model-00004-of-00009.safetensors": "dd9ac46bf5875801e7401a43c007b015b6bf7d9f296bdb18a19dba297e0dfa84",
|
| 13 |
+
"model-00005-of-00009.safetensors": "141b2a10d73d5414dc61941047b6dc1b7e67ad4451ab56e3a2d134e8edfc14f6",
|
| 14 |
+
"model-00006-of-00009.safetensors": "34eb49dc4a71246984d1e75ccdf769039fc72d7e21ead85cfde8a247462d130a",
|
| 15 |
+
"model-00007-of-00009.safetensors": "a88425021ba48d7357f9f8bc11a605b2ea537fdb18ca5c473bd3b80e87bfac81",
|
| 16 |
+
"model-00008-of-00009.safetensors": "b338e95a44b4bb9ccef8285598c1c5a84df9e226d413d9f40e1bdd05cdfe7f3b",
|
| 17 |
+
"model-00009-of-00009.safetensors": "91f6aca2ef1ff613c4115732f954a7b2386d224dfaa34a05267c5688441ea187"
|
| 18 |
+
},
|
| 19 |
+
"base_revision": "0e9e39f249a16976918f6564b8830bc894c89659",
|
| 20 |
+
"source_generation_checks_passed": 3,
|
| 21 |
+
"license": "llama3.1",
|
| 22 |
+
"all_parameters_finite": true,
|
| 23 |
+
"cached_export_byte_identical_to_source": true,
|
| 24 |
+
"release_inference_check": {
|
| 25 |
+
"status": "passed",
|
| 26 |
+
"examples": 3,
|
| 27 |
+
"input": "examples/histories.jsonl",
|
| 28 |
+
"output": "examples/replies.jsonl",
|
| 29 |
+
"decoding": "greedy",
|
| 30 |
+
"max_new_tokens": 128,
|
| 31 |
+
"quantization": "none",
|
| 32 |
+
"torch": "2.5.1+cu121",
|
| 33 |
+
"transformers": "5.13.0"
|
| 34 |
+
}
|
| 35 |
+
}
|