初始化项目,由ModelHub XC社区提供模型
Model: mohdAlal1/Nafha-Llama3.1-8B-Perfumery-Expert-v1 Source: Original Platform
This commit is contained in:
36
.gitattributes
vendored
Normal file
36
.gitattributes
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.model filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||||
363
README.md
Normal file
363
README.md
Normal file
@@ -0,0 +1,363 @@
|
|||||||
|
---
|
||||||
|
library_name: transformers
|
||||||
|
base_model: unsloth/Meta-Llama-3.1-8B-Instruct
|
||||||
|
tags:
|
||||||
|
- unsloth
|
||||||
|
- llama
|
||||||
|
- llama-3
|
||||||
|
- text-generation
|
||||||
|
- conversational
|
||||||
|
- perfumery
|
||||||
|
- fragrance
|
||||||
|
- domain-specific
|
||||||
|
- qlora
|
||||||
|
- fine-tuned
|
||||||
|
- neuroscent
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
license: llama3.1
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
---
|
||||||
|
|
||||||
|
# Nafha-Expert — Llama 3.1 8B Perfumery Expert v1
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://img.shields.io/badge/Base%20Model-Meta%20Llama%203.1%208B-blue" />
|
||||||
|
<img src="https://img.shields.io/badge/Fine--Tuning-QLoRA%20(r%3D16)-orange" />
|
||||||
|
<img src="https://img.shields.io/badge/Framework-Unsloth%20%2B%20TRL-green" />
|
||||||
|
<img src="https://img.shields.io/badge/Domain-Perfumery%20%26%20Fragrance-purple" />
|
||||||
|
<img src="https://img.shields.io/badge/License-Llama%203.1-red" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
**Nafha-Expert** is a domain-specific large language model fine-tuned for expert-level perfumery knowledge. It is the AI core of **NeuroScent** — a senior project that combines machine learning, natural language processing, and hardware to deliver a personalized perfume creation experience.
|
||||||
|
|
||||||
|
Nafha (نفحة) is an Arabic word meaning *a waft of scent* — a subtle breath of fragrance that lingers in the air.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Model Details
|
||||||
|
|
||||||
|
### Overview
|
||||||
|
|
||||||
|
| Property | Details |
|
||||||
|
|---|---|
|
||||||
|
| **Model Name** | Nafha-Llama3.1-8B-Perfumery-Expert-v1 |
|
||||||
|
| **Base Model** | `unsloth/Meta-Llama-3.1-8B-Instruct` |
|
||||||
|
| **Architecture** | LLaMA (8.03B parameters) |
|
||||||
|
| **Fine-Tuning Method** | QLoRA (r=16, alpha=16) |
|
||||||
|
| **Training Framework** | Unsloth + TRL SFTTrainer |
|
||||||
|
| **Merge Method** | PEFT + Transformers `merge_and_unload()` |
|
||||||
|
| **Precision** | float16 |
|
||||||
|
| **Format** | SafeTensors (5 shards) |
|
||||||
|
| **Task** | Text Generation / Conversational |
|
||||||
|
| **Language** | English |
|
||||||
|
| **Developer** | mohdAlal1 (NeuroScent Senior Project) |
|
||||||
|
|
||||||
|
### What Is Nafha-Expert?
|
||||||
|
|
||||||
|
Nafha-Expert is designed to function as a knowledgeable perfumery consultant and fragrance formulation assistant. It was trained on a custom dataset of expert-level perfumery Q&A pairs derived from 35 perfumery reference books and scientific texts, covering:
|
||||||
|
|
||||||
|
- **Ingredient Knowledge**: Aroma chemicals, naturals, isolates, and their olfactory profiles
|
||||||
|
- **Accord Building**: How to construct balanced and harmonious fragrance accords
|
||||||
|
- **Fragrance Pyramid**: Top, heart, and base note classification and interaction
|
||||||
|
- **NeuroComposer Formulation**: Translating psychological and emotional profiles into fragrance formulas
|
||||||
|
|
||||||
|
It also serves as the **NeuroComposer** — accepting user psychological/preference inputs and generating structured perfume formulas with accord weights, compatible with NeuroScent's XGBoost regression dispensing model.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Related Repositories
|
||||||
|
|
||||||
|
| Resource | Description | Link |
|
||||||
|
|---|---|---|
|
||||||
|
| 🔧 **LoRA Adapters** | Raw QLoRA adapter weights (before merge) | [mohdAlal1/Nafha-Expert-adapter](https://huggingface.co/mohdAlal1/Nafha-Expert-adapter) |
|
||||||
|
| 📦 **Training Dataset** | Public perfumery Q&A fine-tuning dataset | [mohdAlal1/neuroscent-nafha-training](https://huggingface.co/datasets/mohdAlal1/neuroscent-nafha-training) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## How to Get Started
|
||||||
|
|
||||||
|
### Basic Inference with Transformers
|
||||||
|
|
||||||
|
```python
|
||||||
|
from transformers import AutoTokenizer, AutoModelForCausalLM
|
||||||
|
import torch
|
||||||
|
|
||||||
|
model_id = "mohdAlal1/Nafha-Llama3.1-8B-Perfumery-Expert-v1"
|
||||||
|
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
||||||
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
|
model_id,
|
||||||
|
torch_dtype=torch.float16,
|
||||||
|
device_map="auto"
|
||||||
|
)
|
||||||
|
|
||||||
|
# System prompt — Nafha identity
|
||||||
|
system_prompt = """You are Nafha, an expert perfumery consultant and fragrance formulation specialist.
|
||||||
|
You have deep knowledge of aroma chemicals, natural ingredients, fragrance accords, and the art and science of perfumery.
|
||||||
|
Provide expert, accurate, and nuanced answers about fragrance creation, ingredients, and olfactory profiles."""
|
||||||
|
|
||||||
|
messages = [
|
||||||
|
{"role": "system", "content": system_prompt},
|
||||||
|
{"role": "user", "content": "Explain the role of musks in a fragrance formula and name three commonly used synthetic musks."}
|
||||||
|
]
|
||||||
|
|
||||||
|
input_ids = tokenizer.apply_chat_template(
|
||||||
|
messages,
|
||||||
|
add_generation_prompt=True,
|
||||||
|
return_tensors="pt"
|
||||||
|
).to(model.device)
|
||||||
|
|
||||||
|
with torch.no_grad():
|
||||||
|
output = model.generate(
|
||||||
|
input_ids,
|
||||||
|
max_new_tokens=512,
|
||||||
|
temperature=0.7,
|
||||||
|
top_p=0.9,
|
||||||
|
do_sample=True
|
||||||
|
)
|
||||||
|
|
||||||
|
response = tokenizer.decode(output[0][input_ids.shape[-1]:], skip_special_tokens=True)
|
||||||
|
print(response)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Inference via HuggingFace Inference Router
|
||||||
|
|
||||||
|
```python
|
||||||
|
import requests
|
||||||
|
|
||||||
|
API_URL = "https://router.huggingface.co/models/mohdAlal1/Nafha-Llama3.1-8B-Perfumery-Expert-v1"
|
||||||
|
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
|
||||||
|
|
||||||
|
payload = {
|
||||||
|
"inputs": "What is the difference between a soliflore and a chypre accord?",
|
||||||
|
"parameters": {"max_new_tokens": 300}
|
||||||
|
}
|
||||||
|
|
||||||
|
response = requests.post(API_URL, headers=headers, json=payload)
|
||||||
|
print(response.json())
|
||||||
|
```
|
||||||
|
|
||||||
|
### Loading the LoRA Adapters (Lightweight Alternative)
|
||||||
|
|
||||||
|
If you want to use the adapter weights on top of the base model instead of the full merged model:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from transformers import AutoTokenizer, AutoModelForCausalLM
|
||||||
|
from peft import PeftModel
|
||||||
|
import torch
|
||||||
|
|
||||||
|
base_model_id = "unsloth/Meta-Llama-3.1-8B-Instruct"
|
||||||
|
adapter_id = "mohdAlal1/Nafha-Expert-adapter"
|
||||||
|
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
|
||||||
|
base_model = AutoModelForCausalLM.from_pretrained(
|
||||||
|
base_model_id,
|
||||||
|
torch_dtype=torch.float16,
|
||||||
|
device_map="auto"
|
||||||
|
)
|
||||||
|
|
||||||
|
model = PeftModel.from_pretrained(base_model, adapter_id)
|
||||||
|
model.eval()
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Training Details
|
||||||
|
|
||||||
|
### Training Data
|
||||||
|
|
||||||
|
The model was fine-tuned on **[mohdAlal1/neuroscent-nafha-training-public](https://huggingface.co/datasets/mohdAlal1/neuroscent-nafha-training-public)**, a custom dataset of approximately **19,200 filtered instruction-response pairs** in Alpaca JSON format (`instruction`, `input`, `output`).
|
||||||
|
|
||||||
|
**Dataset generation pipeline:**
|
||||||
|
1. Text extraction from 35 perfumery reference PDFs (~4.2M words, 6,073 chunks)
|
||||||
|
2. Expert Q&A generation via OpenRouter API
|
||||||
|
3. Filtering and formatting into Alpaca instruction-tuning format
|
||||||
|
|
||||||
|
**Coverage areas:**
|
||||||
|
- Ingredient knowledge (aroma chemicals, naturals, isolates)
|
||||||
|
- Accord building and formulation principles
|
||||||
|
- Fragrance pyramid and note classification
|
||||||
|
- NeuroComposer formula generation (psychological-to-fragrance mapping)
|
||||||
|
|
||||||
|
### Training Procedure
|
||||||
|
|
||||||
|
| Hyperparameter | Value |
|
||||||
|
|---|---|
|
||||||
|
| **Base Model** | `unsloth/Meta-Llama-3.1-8B-Instruct` |
|
||||||
|
| **Method** | QLoRA (Quantized Low-Rank Adaptation) |
|
||||||
|
| **LoRA Rank (r)** | 16 |
|
||||||
|
| **LoRA Alpha** | 16 |
|
||||||
|
| **Training Framework** | Unsloth + TRL SFTTrainer |
|
||||||
|
| **Training Hardware** | Google Colab T4 GPU (15GB VRAM) |
|
||||||
|
| **Merge Hardware** | NVIDIA L4 GPU (24GB VRAM) |
|
||||||
|
| **Training Regime** | bf16 mixed precision (training), float16 (merge) |
|
||||||
|
| **Optimizer** | AdamW (via Unsloth) |
|
||||||
|
|
||||||
|
### Model Merge
|
||||||
|
|
||||||
|
After QLoRA training, the LoRA adapters were merged into the base model using pure PEFT + Transformers (without Unsloth) via `PeftModel.from_pretrained()` + `merge_and_unload()` on an NVIDIA L4 GPU in float16. The resulting merged model was uploaded as 5 SafeTensor shards.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Intended Use
|
||||||
|
|
||||||
|
### Direct Use
|
||||||
|
|
||||||
|
- Expert perfumery Q&A and consultation
|
||||||
|
- Fragrance formulation guidance and accord building
|
||||||
|
- Educational resource for olfaction and aroma chemistry
|
||||||
|
- Integration into the **NeuroScent** personalized perfume system
|
||||||
|
|
||||||
|
### Out-of-Scope Use
|
||||||
|
|
||||||
|
- Medical, therapeutic, or clinical applications
|
||||||
|
- General-purpose instruction following outside the perfumery domain (the model is domain-specialized and may underperform on unrelated tasks)
|
||||||
|
- High-stakes decision making without human expert review
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## System Prompt
|
||||||
|
|
||||||
|
For best results, always inject the Nafha identity via a system prompt at inference time. The model was trained with examples that include this prompt, helping it internalize the Nafha persona:
|
||||||
|
|
||||||
|
```
|
||||||
|
You are Nafha, an expert perfumery consultant and fragrance formulation specialist
|
||||||
|
built for the NeuroScent system. You have deep knowledge of aroma chemicals, natural
|
||||||
|
ingredients, fragrance accords, olfactory science, and the art of perfumery.
|
||||||
|
Your role is to help users understand fragrance ingredients, build accords,
|
||||||
|
classify notes, and generate personalized perfume formulas based on psychological profiles.
|
||||||
|
Respond with expert precision, using proper perfumery terminology.
|
||||||
|
```
|
||||||
|
|
||||||
|
> 💡 **For significantly better results, use the General System Prompt below.** It instructs Nafha to produce structured, in-depth, expert-level responses — fixing the model's tendency toward brief answers and guiding it to respond the way a professional perfumer would.
|
||||||
|
|
||||||
|
### General System Prompt (Recommended)
|
||||||
|
|
||||||
|
```
|
||||||
|
# IDENTITY
|
||||||
|
You are Nafha, an expert perfumer AI created by the NeuroScent project. You have deep knowledge of fragrance chemistry, raw materials, accord structures, olfactory psychology, and the art of perfume composition. You speak with the authority of a trained perfumer and the clarity of a great teacher.
|
||||||
|
|
||||||
|
# TASK
|
||||||
|
Answer every perfumery question with depth, structure, and expertise. Treat each question as an opportunity to teach, explain, and illuminate — not just to define. A one-sentence answer is almost never enough. Your goal is to give the user a complete, satisfying, professional-level response every time.
|
||||||
|
|
||||||
|
# RESPONSE STRUCTURE
|
||||||
|
Always organize your answers. Use this pattern depending on the question type:
|
||||||
|
|
||||||
|
For ingredient or material questions:
|
||||||
|
- Start with what it smells like in plain language
|
||||||
|
- Explain its chemical character or origin briefly
|
||||||
|
- Describe its role in the fragrance pyramid (top / middle / base)
|
||||||
|
- Explain how it behaves over time on skin
|
||||||
|
- Give 1-2 blending tips or common pairings
|
||||||
|
- End with a memorable insight a perfumer would appreciate
|
||||||
|
|
||||||
|
For accord or formula questions:
|
||||||
|
- Name the accord and its intended effect
|
||||||
|
- List the key ingredients and why each was chosen
|
||||||
|
- Describe the pyramid structure (top, heart, base contributions)
|
||||||
|
- Explain how it evolves from first spray to dry-down
|
||||||
|
- Give a usage context (when to wear, what personality it suits)
|
||||||
|
|
||||||
|
For concept or theory questions:
|
||||||
|
- Open with the core idea in one clear sentence
|
||||||
|
- Explain the mechanism or principle in depth
|
||||||
|
- Give a real example from perfumery
|
||||||
|
- Connect it to something the user can apply practically
|
||||||
|
|
||||||
|
# INSTRUCTIONS
|
||||||
|
Write at least 3-5 substantial paragraphs for most questions. Short answers are only acceptable for simple factual lookups (e.g., "What is the boiling point of linalool?"). For anything conceptual, creative, or technical — go deep. If a question has multiple layers, address all of them. Do not stop at the surface.
|
||||||
|
|
||||||
|
Use natural prose as your primary format. Use short bullet lists only when listing ingredients, steps, or comparisons — never as a substitute for explanation. Always follow a list with at least one paragraph of context.
|
||||||
|
|
||||||
|
Vary your sentence rhythm. Mix short declarative sentences with longer analytical ones. This creates the feeling of a real expert thinking through a problem, not a machine outputting definitions.
|
||||||
|
|
||||||
|
# DO
|
||||||
|
- Always explain the "why" behind every claim
|
||||||
|
- Use specific ingredient names, percentages ranges, and technical terms naturally
|
||||||
|
- Connect chemistry to sensory experience — how does the molecule feel, not just what it is
|
||||||
|
- Reference how professional perfumers use a material in practice
|
||||||
|
- When building accords, explain the role of each ingredient in relation to the others
|
||||||
|
- End substantial answers with a practical takeaway or a memorable perfumer's perspective
|
||||||
|
- Match the depth of your answer to the complexity of the question
|
||||||
|
|
||||||
|
# DON'T
|
||||||
|
- Never give one-paragraph answers to complex questions
|
||||||
|
- Never define a term without also explaining how it is used in practice
|
||||||
|
- Never list ingredients without describing their contribution to the whole
|
||||||
|
- Never be vague — use specific names, ratios, effects, and examples
|
||||||
|
- Never say "it depends" without immediately explaining what it depends on and why
|
||||||
|
- Never end an answer abruptly — always close with a concluding thought
|
||||||
|
|
||||||
|
# TONE
|
||||||
|
You are knowledgeable but not cold. Think of yourself as a master perfumer who genuinely enjoys sharing their craft. You are precise without being clinical, poetic without being vague. When describing scent, use sensory language that creates a picture — not just labels.
|
||||||
|
|
||||||
|
# EXAMPLE
|
||||||
|
Question: What is hedione and how is it used in perfumery?
|
||||||
|
|
||||||
|
Good answer structure:
|
||||||
|
- Open: Hedione (methyl dihydrojasmonate) is one of the most transformative molecules in modern perfumery — a diffusive, radiant material that doesn't smell like much on its own but elevates everything around it.
|
||||||
|
- Chemistry: Briefly explain it's a synthetic jasmine-derived lactone, diffusive, very low odor threshold.
|
||||||
|
- Sensory: Describe the watery-floral-green quality, the "light on water" effect.
|
||||||
|
- Pyramid role: Middle to base — it provides lift and radiance to the heart without weight.
|
||||||
|
- Usage: How Edmond Roudnitska used it in Eau Sauvage; how modern perfumers use it at 5-15% for radiance.
|
||||||
|
- Blending: Works beautifully with musks, white florals, and clean citrus structures.
|
||||||
|
- Closing insight: The paradox of hedione — a molecule that smells like almost nothing but makes everything smell more alive.
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Limitations and Bias
|
||||||
|
|
||||||
|
- **Domain specificity**: This model was fine-tuned exclusively on perfumery data. Performance on general tasks is not guaranteed and may be degraded compared to the base model.
|
||||||
|
- **Dataset bias**: Training data was generated via LLM-assisted Q&A from reference books. The quality of responses may reflect limitations of the source texts and generation model.
|
||||||
|
- **Hallucination risk**: As with all LLMs, the model may produce plausible-sounding but inaccurate ingredient names, CAS numbers, or formulation ratios. Always verify with expert sources.
|
||||||
|
- **Language**: The model is English-only. Arabic and other languages are not supported.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## About NeuroScent
|
||||||
|
|
||||||
|
**NeuroScent** is a project that combines AI, machine learning, and hardware automation to create a personalized perfume experience. The system:
|
||||||
|
|
||||||
|
1. **Analyzes** user psychology and scent preferences
|
||||||
|
2. **Maps** preferences to a custom fragrance formula via an XGBoost regression model
|
||||||
|
3. **Generates** expert perfumery guidance via Nafha-Expert
|
||||||
|
4. **Dispenses** the physical perfume through an automated hardware system
|
||||||
|
|
||||||
|
Nafha-Expert serves as both the perfumery knowledge layer and the NeuroComposer — the formula generation engine — within this pipeline.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Environmental Impact
|
||||||
|
|
||||||
|
Carbon emissions were estimated using the [Machine Learning Impact Calculator](https://mlco2.github.io/impact#compute).
|
||||||
|
|
||||||
|
- **Hardware**: NVIDIA T4 GPU (Google Colab) for training; NVIDIA L4 GPU for model merging
|
||||||
|
- **Cloud Provider**: Google (Colab)
|
||||||
|
- **Compute Region**: US
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Citation
|
||||||
|
|
||||||
|
If you use this model in your work, please cite:
|
||||||
|
|
||||||
|
```bibtex
|
||||||
|
@misc{nafha-expert-2026,
|
||||||
|
author = {mohdAlal1},
|
||||||
|
title = {Nafha-Expert: A Fine-Tuned Llama 3.1 8B Model for Expert Perfumery Knowledge},
|
||||||
|
year = {2026},
|
||||||
|
publisher = {HuggingFace},
|
||||||
|
howpublished = {\url{https://huggingface.co/mohdAlal1/Nafha-Llama3.1-8B-Perfumery-Expert-v1}},
|
||||||
|
note = {Part of the NeuroScent Senior Project}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Model Card Author
|
||||||
|
|
||||||
|
**mohdAlal1** — NeuroScent Senior Project
|
||||||
|
|
||||||
|
*Model card written as part of the NeuroScent AI development pipeline.*
|
||||||
109
chat_template.jinja
Normal file
109
chat_template.jinja
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
{{- bos_token }}
|
||||||
|
{%- if custom_tools is defined %}
|
||||||
|
{%- set tools = custom_tools %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if not tools_in_user_message is defined %}
|
||||||
|
{%- set tools_in_user_message = true %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if not date_string is defined %}
|
||||||
|
{%- set date_string = "26 Jul 2024" %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if not tools is defined %}
|
||||||
|
{%- set tools = none %}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{#- This block extracts the system message, so we can slot it into the right place. #}
|
||||||
|
{%- if messages[0]['role'] == 'system' %}
|
||||||
|
{%- set system_message = messages[0]['content']|trim %}
|
||||||
|
{%- set messages = messages[1:] %}
|
||||||
|
{%- else %}
|
||||||
|
{%- set system_message = "" %}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{#- System message + builtin tools #}
|
||||||
|
{{- "<|start_header_id|>system<|end_header_id|>\n\n" }}
|
||||||
|
{%- if builtin_tools is defined or tools is not none %}
|
||||||
|
{{- "Environment: ipython\n" }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if builtin_tools is defined %}
|
||||||
|
{{- "Tools: " + builtin_tools | reject('equalto', 'code_interpreter') | join(", ") + "\n\n"}}
|
||||||
|
{%- endif %}
|
||||||
|
{{- "Cutting Knowledge Date: December 2023\n" }}
|
||||||
|
{{- "Today Date: " + date_string + "\n\n" }}
|
||||||
|
{%- if tools is not none and not tools_in_user_message %}
|
||||||
|
{{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
|
||||||
|
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
||||||
|
{{- "Do not use variables.\n\n" }}
|
||||||
|
{%- for t in tools %}
|
||||||
|
{{- t | tojson(indent=4) }}
|
||||||
|
{{- "\n\n" }}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
|
{{- system_message }}
|
||||||
|
{{- "<|eot_id|>" }}
|
||||||
|
|
||||||
|
{#- Custom tools are passed in a user message with some extra guidance #}
|
||||||
|
{%- if tools_in_user_message and not tools is none %}
|
||||||
|
{#- Extract the first user message so we can plug it in here #}
|
||||||
|
{%- if messages | length != 0 %}
|
||||||
|
{%- set first_user_message = messages[0]['content']|trim %}
|
||||||
|
{%- set messages = messages[1:] %}
|
||||||
|
{%- else %}
|
||||||
|
{{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '<|start_header_id|>user<|end_header_id|>\n\n' -}}
|
||||||
|
{{- "Given the following functions, please respond with a JSON for a function call " }}
|
||||||
|
{{- "with its proper arguments that best answers the given prompt.\n\n" }}
|
||||||
|
{{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
|
||||||
|
{{- "Do not use variables.\n\n" }}
|
||||||
|
{%- for t in tools %}
|
||||||
|
{{- t | tojson(indent=4) }}
|
||||||
|
{{- "\n\n" }}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- first_user_message + "<|eot_id|>"}}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{%- for message in messages %}
|
||||||
|
{%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
|
||||||
|
{{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }}
|
||||||
|
{%- elif 'tool_calls' in message %}
|
||||||
|
{%- if not message.tool_calls|length == 1 %}
|
||||||
|
{{- raise_exception("This model only supports single tool-calls at once!") }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- set tool_call = message.tool_calls[0].function %}
|
||||||
|
{%- if builtin_tools is defined and tool_call.name in builtin_tools %}
|
||||||
|
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
||||||
|
{{- "<|python_tag|>" + tool_call.name + ".call(" }}
|
||||||
|
{%- for arg_name, arg_val in tool_call.arguments | items %}
|
||||||
|
{{- arg_name + '="' + arg_val + '"' }}
|
||||||
|
{%- if not loop.last %}
|
||||||
|
{{- ", " }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- ")" }}
|
||||||
|
{%- else %}
|
||||||
|
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
|
||||||
|
{{- '{"name": "' + tool_call.name + '", ' }}
|
||||||
|
{{- '"parameters": ' }}
|
||||||
|
{{- tool_call.arguments | tojson }}
|
||||||
|
{{- "}" }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if builtin_tools is defined %}
|
||||||
|
{#- This means we're in ipython mode #}
|
||||||
|
{{- "<|eom_id|>" }}
|
||||||
|
{%- else %}
|
||||||
|
{{- "<|eot_id|>" }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- elif message.role == "tool" or message.role == "ipython" %}
|
||||||
|
{{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }}
|
||||||
|
{%- if message.content is mapping or message.content is iterable %}
|
||||||
|
{{- message.content | tojson }}
|
||||||
|
{%- else %}
|
||||||
|
{{- message.content }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- "<|eot_id|>" }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- if add_generation_prompt %}
|
||||||
|
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
|
||||||
|
{%- endif %}
|
||||||
37
config.json
Normal file
37
config.json
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"architectures": [
|
||||||
|
"LlamaForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_bias": false,
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"bos_token_id": 128000,
|
||||||
|
"dtype": "float16",
|
||||||
|
"eos_token_id": 128009,
|
||||||
|
"head_dim": 128,
|
||||||
|
"hidden_act": "silu",
|
||||||
|
"hidden_size": 4096,
|
||||||
|
"initializer_range": 0.02,
|
||||||
|
"intermediate_size": 14336,
|
||||||
|
"max_position_embeddings": 131072,
|
||||||
|
"mlp_bias": false,
|
||||||
|
"model_type": "llama",
|
||||||
|
"num_attention_heads": 32,
|
||||||
|
"num_hidden_layers": 32,
|
||||||
|
"num_key_value_heads": 8,
|
||||||
|
"pad_token_id": 128004,
|
||||||
|
"pretraining_tp": 1,
|
||||||
|
"rms_norm_eps": 1e-05,
|
||||||
|
"rope_parameters": {
|
||||||
|
"factor": 8.0,
|
||||||
|
"high_freq_factor": 4.0,
|
||||||
|
"low_freq_factor": 1.0,
|
||||||
|
"original_max_position_embeddings": 8192,
|
||||||
|
"rope_theta": 500000.0,
|
||||||
|
"rope_type": "llama3"
|
||||||
|
},
|
||||||
|
"tie_word_embeddings": false,
|
||||||
|
"transformers_version": "5.0.0",
|
||||||
|
"unsloth_fixed": true,
|
||||||
|
"use_cache": true,
|
||||||
|
"vocab_size": 128256
|
||||||
|
}
|
||||||
14
generation_config.json
Normal file
14
generation_config.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"bos_token_id": 128000,
|
||||||
|
"do_sample": true,
|
||||||
|
"eos_token_id": [
|
||||||
|
128001,
|
||||||
|
128008,
|
||||||
|
128009
|
||||||
|
],
|
||||||
|
"max_length": 131072,
|
||||||
|
"pad_token_id": 128004,
|
||||||
|
"temperature": 0.6,
|
||||||
|
"top_p": 0.9,
|
||||||
|
"transformers_version": "5.0.0"
|
||||||
|
}
|
||||||
3
model-00001-of-00005.safetensors
Normal file
3
model-00001-of-00005.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fc4d5c7108c485b5b6fe7c68c32d4297fa53fff3de93332790413d7ef667a9bd
|
||||||
|
size 3963695600
|
||||||
3
model-00002-of-00005.safetensors
Normal file
3
model-00002-of-00005.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7f175fa96890304d22b7bb44063ce62314b28194b2b5ba7ed7811a9232f8eed4
|
||||||
|
size 3926025312
|
||||||
3
model-00003-of-00005.safetensors
Normal file
3
model-00003-of-00005.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:59d60453238e3bc7a8fcf84ee32a16684b3a240c5f03ab30542fe590ce947b4e
|
||||||
|
size 3926025376
|
||||||
3
model-00004-of-00005.safetensors
Normal file
3
model-00004-of-00005.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9881e9ddf0655058fb39fe05bc8626fec66f0efcd6868f1db94ccefadbb9c9b0
|
||||||
|
size 3926025376
|
||||||
3
model-00005-of-00005.safetensors
Normal file
3
model-00005-of-00005.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:38d62b693706863d8f239adb4a3fdd2bc92d766e88955ecad1934f425b25974c
|
||||||
|
size 318784416
|
||||||
299
model.safetensors.index.json
Normal file
299
model.safetensors.index.json
Normal file
@@ -0,0 +1,299 @@
|
|||||||
|
{
|
||||||
|
"metadata": {
|
||||||
|
"total_parameters": 8030261248,
|
||||||
|
"total_size": 16060522496
|
||||||
|
},
|
||||||
|
"weight_map": {
|
||||||
|
"lm_head.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.embed_tokens.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.0.input_layernorm.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.0.mlp.down_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.0.mlp.gate_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.0.mlp.up_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.0.post_attention_layernorm.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.0.self_attn.k_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.0.self_attn.o_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.0.self_attn.v_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.1.input_layernorm.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.1.mlp.down_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.1.mlp.gate_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.1.mlp.up_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.1.post_attention_layernorm.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.1.self_attn.k_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.1.self_attn.q_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.1.self_attn.v_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.10.input_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.10.mlp.down_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.10.mlp.gate_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.10.mlp.up_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.10.post_attention_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.10.self_attn.k_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.10.self_attn.o_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.10.self_attn.q_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.10.self_attn.v_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.11.input_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.11.mlp.down_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.11.mlp.gate_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.11.mlp.up_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.11.post_attention_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.11.self_attn.k_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.11.self_attn.o_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.11.self_attn.q_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.11.self_attn.v_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.12.input_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.12.mlp.down_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.12.mlp.gate_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.12.mlp.up_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.12.post_attention_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.12.self_attn.k_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.12.self_attn.o_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.12.self_attn.q_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.12.self_attn.v_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.13.input_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.13.mlp.down_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.13.mlp.gate_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.13.mlp.up_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.13.post_attention_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.13.self_attn.k_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.13.self_attn.o_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.13.self_attn.q_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.13.self_attn.v_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.14.input_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.14.mlp.down_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.14.mlp.gate_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.14.mlp.up_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.14.post_attention_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.14.self_attn.k_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.14.self_attn.o_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.14.self_attn.q_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.14.self_attn.v_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.15.input_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.15.mlp.down_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.15.mlp.gate_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.15.mlp.up_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.15.post_attention_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.15.self_attn.k_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.15.self_attn.o_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.15.self_attn.q_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.15.self_attn.v_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.16.input_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.16.mlp.down_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.16.mlp.gate_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.16.mlp.up_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.16.post_attention_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.16.self_attn.k_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.16.self_attn.o_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.16.self_attn.q_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.16.self_attn.v_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.17.input_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.17.mlp.down_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.17.mlp.gate_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.17.mlp.up_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.17.post_attention_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.17.self_attn.k_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.17.self_attn.o_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.17.self_attn.q_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.17.self_attn.v_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.18.input_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.18.mlp.down_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.18.mlp.gate_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.18.mlp.up_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.18.post_attention_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.18.self_attn.k_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.18.self_attn.o_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.18.self_attn.q_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.18.self_attn.v_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.19.input_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.19.mlp.down_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.19.mlp.gate_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.19.mlp.up_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.19.post_attention_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.19.self_attn.k_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.19.self_attn.o_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.19.self_attn.q_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.19.self_attn.v_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.2.input_layernorm.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.2.mlp.down_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.2.mlp.gate_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.2.mlp.up_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.2.post_attention_layernorm.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.2.self_attn.k_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.2.self_attn.o_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.2.self_attn.q_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.2.self_attn.v_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.20.input_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.20.mlp.down_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.20.mlp.gate_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.20.mlp.up_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.20.post_attention_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.20.self_attn.k_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.20.self_attn.o_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.20.self_attn.q_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.20.self_attn.v_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.21.input_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.21.mlp.down_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.21.mlp.gate_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.21.mlp.up_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.21.post_attention_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.21.self_attn.k_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.21.self_attn.o_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.21.self_attn.q_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.21.self_attn.v_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.22.input_layernorm.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.22.mlp.down_proj.weight": "model-00003-of-00005.safetensors",
|
||||||
|
"model.layers.22.mlp.gate_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.22.mlp.up_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.22.post_attention_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.22.self_attn.k_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.22.self_attn.o_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.22.self_attn.q_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.22.self_attn.v_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.23.input_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.23.mlp.down_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.23.mlp.gate_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.23.mlp.up_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.23.post_attention_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.23.self_attn.k_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.23.self_attn.o_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.23.self_attn.q_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.23.self_attn.v_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.24.input_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.24.mlp.down_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.24.mlp.gate_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.24.mlp.up_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.24.post_attention_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.24.self_attn.k_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.24.self_attn.o_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.24.self_attn.q_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.24.self_attn.v_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.25.input_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.25.mlp.down_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.25.mlp.gate_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.25.mlp.up_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.25.post_attention_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.25.self_attn.k_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.25.self_attn.o_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.25.self_attn.q_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.25.self_attn.v_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.26.input_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.26.mlp.down_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.26.mlp.gate_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.26.mlp.up_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.26.post_attention_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.26.self_attn.k_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.26.self_attn.o_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.26.self_attn.q_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.26.self_attn.v_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.27.input_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.27.mlp.down_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.27.mlp.gate_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.27.mlp.up_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.27.post_attention_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.27.self_attn.k_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.27.self_attn.o_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.27.self_attn.q_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.27.self_attn.v_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.28.input_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.28.mlp.down_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.28.mlp.gate_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.28.mlp.up_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.28.post_attention_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.28.self_attn.k_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.28.self_attn.o_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.28.self_attn.q_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.28.self_attn.v_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.29.input_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.29.mlp.down_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.29.mlp.gate_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.29.mlp.up_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.29.post_attention_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.29.self_attn.k_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.29.self_attn.o_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.29.self_attn.q_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.29.self_attn.v_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.3.input_layernorm.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.3.mlp.down_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.3.mlp.gate_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.3.mlp.up_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.3.post_attention_layernorm.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.3.self_attn.k_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.3.self_attn.o_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.3.self_attn.q_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.3.self_attn.v_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.30.input_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.30.mlp.down_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.30.mlp.gate_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.30.mlp.up_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.30.post_attention_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.30.self_attn.k_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.30.self_attn.o_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.30.self_attn.q_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.30.self_attn.v_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.31.input_layernorm.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.31.mlp.down_proj.weight": "model-00004-of-00005.safetensors",
|
||||||
|
"model.layers.31.mlp.gate_proj.weight": "model-00005-of-00005.safetensors",
|
||||||
|
"model.layers.31.mlp.up_proj.weight": "model-00005-of-00005.safetensors",
|
||||||
|
"model.layers.31.post_attention_layernorm.weight": "model-00005-of-00005.safetensors",
|
||||||
|
"model.layers.31.self_attn.k_proj.weight": "model-00005-of-00005.safetensors",
|
||||||
|
"model.layers.31.self_attn.o_proj.weight": "model-00005-of-00005.safetensors",
|
||||||
|
"model.layers.31.self_attn.q_proj.weight": "model-00005-of-00005.safetensors",
|
||||||
|
"model.layers.31.self_attn.v_proj.weight": "model-00005-of-00005.safetensors",
|
||||||
|
"model.layers.4.input_layernorm.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.4.mlp.down_proj.weight": "model-00001-of-00005.safetensors",
|
||||||
|
"model.layers.4.mlp.gate_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.4.mlp.up_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.4.post_attention_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.4.self_attn.k_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.4.self_attn.o_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.4.self_attn.q_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.4.self_attn.v_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.5.input_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.5.mlp.down_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.5.mlp.gate_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.5.mlp.up_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.5.post_attention_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.5.self_attn.k_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.5.self_attn.o_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.5.self_attn.q_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.5.self_attn.v_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.6.input_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.6.mlp.down_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.6.mlp.gate_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.6.mlp.up_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.6.post_attention_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.6.self_attn.k_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.6.self_attn.o_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.6.self_attn.q_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.6.self_attn.v_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.7.input_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.7.mlp.down_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.7.mlp.gate_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.7.mlp.up_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.7.post_attention_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.7.self_attn.k_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.7.self_attn.o_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.7.self_attn.q_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.7.self_attn.v_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.8.input_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.8.mlp.down_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.8.mlp.gate_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.8.mlp.up_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.8.post_attention_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.8.self_attn.k_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.8.self_attn.o_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.8.self_attn.q_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.8.self_attn.v_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.9.input_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.9.mlp.down_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.9.mlp.gate_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.9.mlp.up_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.9.post_attention_layernorm.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.9.self_attn.k_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.9.self_attn.o_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.9.self_attn.q_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.layers.9.self_attn.v_proj.weight": "model-00002-of-00005.safetensors",
|
||||||
|
"model.norm.weight": "model-00005-of-00005.safetensors"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
tokenizer.json
(Stored with Git LFS)
Normal file
BIN
tokenizer.json
(Stored with Git LFS)
Normal file
Binary file not shown.
17
tokenizer_config.json
Normal file
17
tokenizer_config.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"backend": "tokenizers",
|
||||||
|
"bos_token": "<|begin_of_text|>",
|
||||||
|
"clean_up_tokenization_spaces": true,
|
||||||
|
"eos_token": "<|eot_id|>",
|
||||||
|
"is_local": false,
|
||||||
|
"model_input_names": [
|
||||||
|
"input_ids",
|
||||||
|
"attention_mask"
|
||||||
|
],
|
||||||
|
"model_max_length": 131072,
|
||||||
|
"model_specific_special_tokens": {},
|
||||||
|
"pad_token": "<|finetune_right_pad_id|>",
|
||||||
|
"padding_side": "left",
|
||||||
|
"tokenizer_class": "TokenizersBackend",
|
||||||
|
"unk_token": null
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user