初始化项目,由ModelHub XC社区提供模型
Model: chkrishna2001/psm-memory-qwen-1.5b-gguf Source: Original Platform
This commit is contained in:
6
.gitattributes
vendored
Normal file
6
.gitattributes
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
*.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
gguf/** filter=lfs diff=lfs merge=lfs -text
|
||||||
|
merged-fp16/*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
lora/*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.json filter=lfs diff=lfs merge=lfs -text
|
||||||
8
LICENSE
Normal file
8
LICENSE
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
This model is derived from Qwen1.5-1.8B and inherits the base model license.
|
||||||
|
|
||||||
|
License: Tongyi Qianwen Research License
|
||||||
|
License URL: https://huggingface.co/Qwen/Qwen1.5-1.8B/blob/main/LICENSE
|
||||||
|
|
||||||
|
The files in this repository are model artifacts for PSM Memory, a memory-management model derived from Qwen1.5-1.8B. Use of the model weights is governed by the upstream Qwen1.5-1.8B license terms.
|
||||||
|
|
||||||
|
The PSM Memory npm package source code is licensed separately in the code repository.
|
||||||
105
README.md
Normal file
105
README.md
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
---
|
||||||
|
license: other
|
||||||
|
license_name: tongyi-qianwen-research
|
||||||
|
license_link: https://huggingface.co/Qwen/Qwen1.5-1.8B/blob/main/LICENSE
|
||||||
|
base_model: Qwen/Qwen1.5-1.8B
|
||||||
|
tags:
|
||||||
|
- gguf
|
||||||
|
- qwen
|
||||||
|
- qwen1.5
|
||||||
|
- lora
|
||||||
|
- memory
|
||||||
|
- agent-memory
|
||||||
|
- psm-memory
|
||||||
|
library_name: transformers
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
---
|
||||||
|
|
||||||
|
# PSM Memory Qwen 1.5B
|
||||||
|
|
||||||
|
PSM Memory is a small model trained for memory-management operations in agent systems. It is not intended to answer user questions directly. It is intended to decide what should be remembered, retrieve and rank relevant memories, detect conflicts, and support memory lifecycle operations.
|
||||||
|
|
||||||
|
This repository contains the runtime artifacts for the PSM Memory model derived from Qwen1.5-1.8B.
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
### GGUF runtime artifacts
|
||||||
|
|
||||||
|
- `gguf/psm-memory-qwen-1.5b-q4_k_m.gguf`
|
||||||
|
- Recommended default runtime artifact for `@psm-memory/cli` and `@psm-memory/pi-plugin`.
|
||||||
|
- Quantized GGUF for local inference.
|
||||||
|
|
||||||
|
- `gguf/psm-memory-qwen-1.5b-f16.gguf`
|
||||||
|
- Full precision GGUF export.
|
||||||
|
- Larger and slower, useful for quality comparison and future quantization.
|
||||||
|
|
||||||
|
### Hugging Face / Transformers artifacts
|
||||||
|
|
||||||
|
- `merged-fp16/`
|
||||||
|
- Merged FP16 model weights and tokenizer/config files.
|
||||||
|
- Useful for inspection, conversion, or further export.
|
||||||
|
|
||||||
|
- `lora/`
|
||||||
|
- LoRA adapter weights and tokenizer/config files.
|
||||||
|
- Useful for reproducibility and future fine-tuning work.
|
||||||
|
|
||||||
|
### Integrity
|
||||||
|
|
||||||
|
- `checksums.sha256`
|
||||||
|
- SHA-256 checksums for uploaded artifacts.
|
||||||
|
|
||||||
|
## Intended Use
|
||||||
|
|
||||||
|
Use this model as a memory-management component for an LLM agent:
|
||||||
|
|
||||||
|
1. User prompt arrives.
|
||||||
|
2. PSM Memory retrieves/ranks relevant memories and produces context for the main LLM.
|
||||||
|
3. Main LLM responds or takes an action.
|
||||||
|
4. PSM Memory evaluates the response/action and stores durable memory when appropriate.
|
||||||
|
|
||||||
|
The npm packages are:
|
||||||
|
|
||||||
|
- `@psm-memory/sdk`
|
||||||
|
- `@psm-memory/cli`
|
||||||
|
- `@psm-memory/pi-plugin`
|
||||||
|
|
||||||
|
The CLI/plugin should use the Q4_K_M GGUF artifact by default.
|
||||||
|
|
||||||
|
## Not Intended For
|
||||||
|
|
||||||
|
- General chat completion.
|
||||||
|
- Factual QA as a standalone assistant.
|
||||||
|
- Safety-critical autonomous decision-making without external validation.
|
||||||
|
- Storing private user data without consent and appropriate access controls.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This model is a fine-tuned/converted PSM Memory model derived from Qwen1.5-1.8B.
|
||||||
|
|
||||||
|
The model weights are distributed under the Tongyi Qianwen Research License inherited from the base model:
|
||||||
|
|
||||||
|
https://huggingface.co/Qwen/Qwen1.5-1.8B/blob/main/LICENSE
|
||||||
|
|
||||||
|
The PSM Memory npm package code is licensed separately in its source repository.
|
||||||
|
|
||||||
|
## Training Data
|
||||||
|
|
||||||
|
The upload bundle does not include training data by default. If synthetic training data is published, it should be uploaded only after checking that it contains no private, personal, or proprietary content.
|
||||||
|
|
||||||
|
Recommended approach:
|
||||||
|
|
||||||
|
- Add a separate `training-data/` folder for synthetic examples.
|
||||||
|
- Include a short data card explaining how the data was generated.
|
||||||
|
- Include only sanitized synthetic data or a representative sample if the full dataset is large.
|
||||||
|
|
||||||
|
## Reproducibility Notes
|
||||||
|
|
||||||
|
A Colab notebook is not required for using this model. It is useful if you want others to reproduce conversion, quantization, or adapter loading.
|
||||||
|
|
||||||
|
Recommended optional notebooks:
|
||||||
|
|
||||||
|
- `notebooks/convert-to-gguf.ipynb`
|
||||||
|
- `notebooks/quantize-gguf.ipynb`
|
||||||
|
- `notebooks/run-psm-memory.ipynb`
|
||||||
|
|
||||||
|
These can be added later without blocking CLI setup support.
|
||||||
17
checksums.sha256
Normal file
17
checksums.sha256
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
3863f2c8afec2d88d900169d705030ec2a36dbf100b27004973b4696cf3424e8 gguf/psm-memory-qwen-1.5b-f16.gguf
|
||||||
|
05a35ea07f27514e20db9f55e28d4e6f51a15c1684125067a0b65f9b483cc6e3 gguf/psm-memory-qwen-1.5b-q4_k_m.gguf
|
||||||
|
f68eccfd49f84e0d87de4bdf418296badf1d49b90440b6e41718a28e117134a7 LICENSE
|
||||||
|
d07f07a17b2c21199f8b88a1f9703924252da7833d9102b56d69428e31fa2659 lora/adapter_config.json
|
||||||
|
3b797d0c84f46a37c27b3095ad335df2719cabd8f3bdf0cc1dbd92c3e2852891 lora/adapter_model.safetensors
|
||||||
|
cd8e9439f0570856fd70470bf8889ebd8b5d1107207f67a5efb46e342330527f lora/chat_template.jinja
|
||||||
|
64b7055b4141fff271e651244cf5e5e8f962d0780bbb72fc119da70a89cb3e92 lora/README.md
|
||||||
|
bd5948af71b4f56cf697f7580814c7ce8b80595ef985544efcacf716126a2e31 lora/tokenizer.json
|
||||||
|
cc1a48982e39fe91fb630298e09fdc4dfb48903488dd89db0ada95b76abcd8e3 lora/tokenizer_config.json
|
||||||
|
cd8e9439f0570856fd70470bf8889ebd8b5d1107207f67a5efb46e342330527f merged-fp16/chat_template.jinja
|
||||||
|
c6fe78a0b599d02fd77278e914250efe913a8c51161df270428335540acfd35c merged-fp16/config.json
|
||||||
|
2f6ae45953dd2ab26b7d01bb03dcac230f78959ac4999133144203e86c1f8923 merged-fp16/model.safetensors
|
||||||
|
bd5948af71b4f56cf697f7580814c7ce8b80595ef985544efcacf716126a2e31 merged-fp16/tokenizer.json
|
||||||
|
ec2342b980a851bfe1b7c12ad9bc9b4efa9454e7d627b1d3fdcc1a45d6798a25 merged-fp16/tokenizer_config.json
|
||||||
|
2391af20d51d4fd15cc94ec99b7194c94745b3ad8c23e3c2c6b52003fa5d8919 notebooks/README.md
|
||||||
|
fc23b46b6d9f371df6ebf23616d1808fbb334c3f1d177f84b7728892b5b01697 README.md
|
||||||
|
1edc0dcc2615190d46ab8716283535b6396851dab939e23970b84098f29ddec5 training-data/README.md
|
||||||
3
gguf/psm-memory-qwen-1.5b-f16.gguf
Normal file
3
gguf/psm-memory-qwen-1.5b-f16.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3863f2c8afec2d88d900169d705030ec2a36dbf100b27004973b4696cf3424e8
|
||||||
|
size 3093668672
|
||||||
3
gguf/psm-memory-qwen-1.5b-q4_k_m.gguf
Normal file
3
gguf/psm-memory-qwen-1.5b-q4_k_m.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:05a35ea07f27514e20db9f55e28d4e6f51a15c1684125067a0b65f9b483cc6e3
|
||||||
|
size 986047808
|
||||||
210
lora/README.md
Normal file
210
lora/README.md
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
---
|
||||||
|
base_model: unsloth/Qwen2.5-1.5B-Instruct
|
||||||
|
library_name: peft
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
tags:
|
||||||
|
- base_model:adapter:unsloth/Qwen2.5-1.5B-Instruct
|
||||||
|
- lora
|
||||||
|
- sft
|
||||||
|
- transformers
|
||||||
|
- trl
|
||||||
|
- unsloth
|
||||||
|
---
|
||||||
|
|
||||||
|
# Model Card for Model ID
|
||||||
|
|
||||||
|
<!-- Provide a quick summary of what the model is/does. -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Model Details
|
||||||
|
|
||||||
|
### Model Description
|
||||||
|
|
||||||
|
<!-- Provide a longer summary of what this model is. -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- **Developed by:** [More Information Needed]
|
||||||
|
- **Funded by [optional]:** [More Information Needed]
|
||||||
|
- **Shared by [optional]:** [More Information Needed]
|
||||||
|
- **Model type:** [More Information Needed]
|
||||||
|
- **Language(s) (NLP):** [More Information Needed]
|
||||||
|
- **License:** [More Information Needed]
|
||||||
|
- **Finetuned from model [optional]:** [More Information Needed]
|
||||||
|
|
||||||
|
### Model Sources [optional]
|
||||||
|
|
||||||
|
<!-- Provide the basic links for the model. -->
|
||||||
|
|
||||||
|
- **Repository:** [More Information Needed]
|
||||||
|
- **Paper [optional]:** [More Information Needed]
|
||||||
|
- **Demo [optional]:** [More Information Needed]
|
||||||
|
|
||||||
|
## Uses
|
||||||
|
|
||||||
|
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
||||||
|
|
||||||
|
### Direct Use
|
||||||
|
|
||||||
|
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
### Downstream Use [optional]
|
||||||
|
|
||||||
|
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
### Out-of-Scope Use
|
||||||
|
|
||||||
|
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
## Bias, Risks, and Limitations
|
||||||
|
|
||||||
|
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
### Recommendations
|
||||||
|
|
||||||
|
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
||||||
|
|
||||||
|
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
||||||
|
|
||||||
|
## How to Get Started with the Model
|
||||||
|
|
||||||
|
Use the code below to get started with the model.
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
## Training Details
|
||||||
|
|
||||||
|
### Training Data
|
||||||
|
|
||||||
|
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
### Training Procedure
|
||||||
|
|
||||||
|
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
||||||
|
|
||||||
|
#### Preprocessing [optional]
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
|
||||||
|
#### Training Hyperparameters
|
||||||
|
|
||||||
|
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
||||||
|
|
||||||
|
#### Speeds, Sizes, Times [optional]
|
||||||
|
|
||||||
|
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
## Evaluation
|
||||||
|
|
||||||
|
<!-- This section describes the evaluation protocols and provides the results. -->
|
||||||
|
|
||||||
|
### Testing Data, Factors & Metrics
|
||||||
|
|
||||||
|
#### Testing Data
|
||||||
|
|
||||||
|
<!-- This should link to a Dataset Card if possible. -->
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
#### Factors
|
||||||
|
|
||||||
|
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
#### Metrics
|
||||||
|
|
||||||
|
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
### Results
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
#### Summary
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Model Examination [optional]
|
||||||
|
|
||||||
|
<!-- Relevant interpretability work for the model goes here -->
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
## Environmental Impact
|
||||||
|
|
||||||
|
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
||||||
|
|
||||||
|
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
||||||
|
|
||||||
|
- **Hardware Type:** [More Information Needed]
|
||||||
|
- **Hours used:** [More Information Needed]
|
||||||
|
- **Cloud Provider:** [More Information Needed]
|
||||||
|
- **Compute Region:** [More Information Needed]
|
||||||
|
- **Carbon Emitted:** [More Information Needed]
|
||||||
|
|
||||||
|
## Technical Specifications [optional]
|
||||||
|
|
||||||
|
### Model Architecture and Objective
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
### Compute Infrastructure
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
#### Hardware
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
#### Software
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
## Citation [optional]
|
||||||
|
|
||||||
|
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
||||||
|
|
||||||
|
**BibTeX:**
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
**APA:**
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
## Glossary [optional]
|
||||||
|
|
||||||
|
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
## More Information [optional]
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
## Model Card Authors [optional]
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
|
||||||
|
## Model Card Contact
|
||||||
|
|
||||||
|
[More Information Needed]
|
||||||
|
### Framework versions
|
||||||
|
|
||||||
|
- PEFT 0.19.1
|
||||||
BIN
lora/adapter_config.json
(Stored with Git LFS)
Normal file
BIN
lora/adapter_config.json
(Stored with Git LFS)
Normal file
Binary file not shown.
3
lora/adapter_model.safetensors
Normal file
3
lora/adapter_model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3b797d0c84f46a37c27b3095ad335df2719cabd8f3bdf0cc1dbd92c3e2852891
|
||||||
|
size 147770496
|
||||||
54
lora/chat_template.jinja
Normal file
54
lora/chat_template.jinja
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{%- if tools %}
|
||||||
|
{{- '<|im_start|>system\n' }}
|
||||||
|
{%- if messages[0]['role'] == 'system' %}
|
||||||
|
{{- messages[0]['content'] }}
|
||||||
|
{%- else %}
|
||||||
|
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
||||||
|
{%- for tool in tools %}
|
||||||
|
{{- "\n" }}
|
||||||
|
{{- tool | tojson }}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
||||||
|
{%- else %}
|
||||||
|
{%- if messages[0]['role'] == 'system' %}
|
||||||
|
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
||||||
|
{%- else %}
|
||||||
|
{{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for message in messages %}
|
||||||
|
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
||||||
|
{%- elif message.role == "assistant" %}
|
||||||
|
{{- '<|im_start|>' + message.role }}
|
||||||
|
{%- if message.content %}
|
||||||
|
{{- '\n' + message.content }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for tool_call in message.tool_calls %}
|
||||||
|
{%- if tool_call.function is defined %}
|
||||||
|
{%- set tool_call = tool_call.function %}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '\n<tool_call>\n{"name": "' }}
|
||||||
|
{{- tool_call.name }}
|
||||||
|
{{- '", "arguments": ' }}
|
||||||
|
{{- tool_call.arguments | tojson }}
|
||||||
|
{{- '}\n</tool_call>' }}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- elif message.role == "tool" %}
|
||||||
|
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
||||||
|
{{- '<|im_start|>user' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '\n<tool_response>\n' }}
|
||||||
|
{{- message.content }}
|
||||||
|
{{- '\n</tool_response>' }}
|
||||||
|
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- if add_generation_prompt %}
|
||||||
|
{{- '<|im_start|>assistant\n' }}
|
||||||
|
{%- endif %}
|
||||||
3
lora/tokenizer.json
Normal file
3
lora/tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:bd5948af71b4f56cf697f7580814c7ce8b80595ef985544efcacf716126a2e31
|
||||||
|
size 11422356
|
||||||
BIN
lora/tokenizer_config.json
(Stored with Git LFS)
Normal file
BIN
lora/tokenizer_config.json
(Stored with Git LFS)
Normal file
Binary file not shown.
54
merged-fp16/chat_template.jinja
Normal file
54
merged-fp16/chat_template.jinja
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{%- if tools %}
|
||||||
|
{{- '<|im_start|>system\n' }}
|
||||||
|
{%- if messages[0]['role'] == 'system' %}
|
||||||
|
{{- messages[0]['content'] }}
|
||||||
|
{%- else %}
|
||||||
|
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
||||||
|
{%- for tool in tools %}
|
||||||
|
{{- "\n" }}
|
||||||
|
{{- tool | tojson }}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
||||||
|
{%- else %}
|
||||||
|
{%- if messages[0]['role'] == 'system' %}
|
||||||
|
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
||||||
|
{%- else %}
|
||||||
|
{{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for message in messages %}
|
||||||
|
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
||||||
|
{%- elif message.role == "assistant" %}
|
||||||
|
{{- '<|im_start|>' + message.role }}
|
||||||
|
{%- if message.content %}
|
||||||
|
{{- '\n' + message.content }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for tool_call in message.tool_calls %}
|
||||||
|
{%- if tool_call.function is defined %}
|
||||||
|
{%- set tool_call = tool_call.function %}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '\n<tool_call>\n{"name": "' }}
|
||||||
|
{{- tool_call.name }}
|
||||||
|
{{- '", "arguments": ' }}
|
||||||
|
{{- tool_call.arguments | tojson }}
|
||||||
|
{{- '}\n</tool_call>' }}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- elif message.role == "tool" %}
|
||||||
|
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
||||||
|
{{- '<|im_start|>user' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '\n<tool_response>\n' }}
|
||||||
|
{{- message.content }}
|
||||||
|
{{- '\n</tool_response>' }}
|
||||||
|
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- if add_generation_prompt %}
|
||||||
|
{{- '<|im_start|>assistant\n' }}
|
||||||
|
{%- endif %}
|
||||||
BIN
merged-fp16/config.json
(Stored with Git LFS)
Normal file
BIN
merged-fp16/config.json
(Stored with Git LFS)
Normal file
Binary file not shown.
3
merged-fp16/model.safetensors
Normal file
3
merged-fp16/model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2f6ae45953dd2ab26b7d01bb03dcac230f78959ac4999133144203e86c1f8923
|
||||||
|
size 3087467144
|
||||||
3
merged-fp16/tokenizer.json
Normal file
3
merged-fp16/tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:bd5948af71b4f56cf697f7580814c7ce8b80595ef985544efcacf716126a2e31
|
||||||
|
size 11422356
|
||||||
BIN
merged-fp16/tokenizer_config.json
(Stored with Git LFS)
Normal file
BIN
merged-fp16/tokenizer_config.json
(Stored with Git LFS)
Normal file
Binary file not shown.
10
notebooks/README.md
Normal file
10
notebooks/README.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Notebooks
|
||||||
|
|
||||||
|
No notebook is required to use the model.
|
||||||
|
|
||||||
|
Optional notebooks can be added later for:
|
||||||
|
|
||||||
|
- loading the LoRA adapter
|
||||||
|
- converting the merged FP16 model to GGUF
|
||||||
|
- quantizing GGUF to Q4_K_M
|
||||||
|
- running a basic PSM Memory inference example
|
||||||
13
training-data/README.md
Normal file
13
training-data/README.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Training Data
|
||||||
|
|
||||||
|
Training data is not included in this upload bundle yet.
|
||||||
|
|
||||||
|
If synthetic training data is published, include only sanitized data and add:
|
||||||
|
|
||||||
|
- generation method
|
||||||
|
- schema
|
||||||
|
- number of examples
|
||||||
|
- known limitations
|
||||||
|
- license/usage terms
|
||||||
|
|
||||||
|
Do not upload private user conversations, local memory databases, benchmark output databases, or raw logs.
|
||||||
Reference in New Issue
Block a user