初始化项目,由ModelHub XC社区提供模型
Model: prithivMLmods/Llama-Deepsync-1B Source: Original Platform
This commit is contained in:
37
.gitattributes
vendored
Normal file
37
.gitattributes
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
*.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
|
||||||
|
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
108
README.md
Normal file
108
README.md
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
---
|
||||||
|
license: creativeml-openrail-m
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
- de
|
||||||
|
- fr
|
||||||
|
- it
|
||||||
|
- pt
|
||||||
|
- hi
|
||||||
|
- es
|
||||||
|
- th
|
||||||
|
base_model:
|
||||||
|
- meta-llama/Llama-3.2-1B-Instruct
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
tags:
|
||||||
|
- text-generation-inference
|
||||||
|
- Llama
|
||||||
|
- Code
|
||||||
|
- CoT
|
||||||
|
- Math
|
||||||
|
- Deepsync
|
||||||
|
- 3b
|
||||||
|
library_name: transformers
|
||||||
|
---
|
||||||
|
<pre align="center">
|
||||||
|
.___ _______.
|
||||||
|
__| _/____ ____ ______ _________.__. ____ ____ /_ \_ |__
|
||||||
|
/ __ |/ __ \_/ __ \\____ \/ ___< | |/ \_/ ___\ | || __ \
|
||||||
|
/ /_/ \ ___/\ ___/| |_> >___ \ \___ | | \ \___ | || \_\ \
|
||||||
|
\____ |\___ >\___ > __/____ >/ ____|___| /\___ > |___||___ /
|
||||||
|
\/ \/ \/|__| \/ \/ \/ \/ \/
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
The **Llama-Deepsync-1B** is a fine-tuned version of the **Llama-3.2-1B-Instruct** base model, designed for text generation tasks that require deep reasoning, logical structuring, and problem-solving. This model leverages its optimized architecture to provide accurate and contextually relevant outputs for complex queries, making it ideal for applications in education, programming, and creative writing.
|
||||||
|
|
||||||
|
With its robust natural language processing capabilities, **Llama-Deepsync-1B** excels in generating step-by-step solutions, creative content, and logical analyses. Its architecture integrates advanced understanding of both structured and unstructured data, ensuring precise text generation aligned with user inputs.
|
||||||
|
|
||||||
|
- Significantly **more knowledge** and has greatly improved capabilities in **coding** and **mathematics**, thanks to our specialized expert models in these domains.
|
||||||
|
- Significant improvements in **instruction following**, **generating long texts** (over 8K tokens), **understanding structured data** (e.g, tables), and **generating structured outputs** especially JSON. **More resilient to the diversity of system prompts**, enhancing role-play implementation and condition-setting for chatbots.
|
||||||
|
- **Long-context Support** up to 128K tokens and can generate up to 8K tokens.
|
||||||
|
- **Multilingual support** for over 29 languages, including Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
|
||||||
|
|
||||||
|
# **Model Architecture**
|
||||||
|
|
||||||
|
Llama 3.2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety.
|
||||||
|
|
||||||
|
# **Use with transformers**
|
||||||
|
|
||||||
|
Starting with `transformers >= 4.43.0` onward, you can run conversational inference using the Transformers `pipeline` abstraction or by leveraging the Auto classes with the `generate()` function.
|
||||||
|
|
||||||
|
Make sure to update your transformers installation via `pip install --upgrade transformers`.
|
||||||
|
|
||||||
|
```python
|
||||||
|
import torch
|
||||||
|
from transformers import pipeline
|
||||||
|
|
||||||
|
model_id = "prithivMLmods/Llama-Deepsync-1B"
|
||||||
|
pipe = pipeline(
|
||||||
|
"text-generation",
|
||||||
|
model=model_id,
|
||||||
|
torch_dtype=torch.bfloat16,
|
||||||
|
device_map="auto",
|
||||||
|
)
|
||||||
|
messages = [
|
||||||
|
{"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
|
||||||
|
{"role": "user", "content": "Who are you?"},
|
||||||
|
]
|
||||||
|
outputs = pipe(
|
||||||
|
messages,
|
||||||
|
max_new_tokens=256,
|
||||||
|
)
|
||||||
|
print(outputs[0]["generated_text"][-1])
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: You can also find detailed recipes on how to use the model locally, with `torch.compile()`, assisted generations, quantised and more at [`huggingface-llama-recipes`](https://github.com/huggingface/huggingface-llama-recipes)
|
||||||
|
|
||||||
|
# **Run with Ollama [Ollama Run]**
|
||||||
|
|
||||||
|
Ollama makes running machine learning models simple and efficient. Follow these steps to set up and run your GGUF models quickly.
|
||||||
|
|
||||||
|
## Quick Start: Step-by-Step Guide
|
||||||
|
|
||||||
|
| Step | Description | Command / Instructions |
|
||||||
|
|------|-------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| 1 | **Install Ollama 🦙** | Download Ollama from [https://ollama.com/download](https://ollama.com/download) and install it on your system. |
|
||||||
|
| 2 | **Create Your Model File** | - Create a file named after your model, e.g., `metallama`. |
|
||||||
|
| | | - Add the following line to specify the base model: |
|
||||||
|
| | | ```bash |
|
||||||
|
| | | FROM Llama-3.2-1B.F16.gguf |
|
||||||
|
| | | ``` |
|
||||||
|
| | | - Ensure the base model file is in the same directory. |
|
||||||
|
| 3 | **Create and Patch the Model** | Run the following commands to create and verify your model: |
|
||||||
|
| | | ```bash |
|
||||||
|
| | | ollama create metallama -f ./metallama |
|
||||||
|
| | | ollama list |
|
||||||
|
| | | ``` |
|
||||||
|
| 4 | **Run the Model** | Use the following command to start your model: |
|
||||||
|
| | | ```bash |
|
||||||
|
| | | ollama run metallama |
|
||||||
|
| | | ``` |
|
||||||
|
| 5 | **Interact with the Model** | Once the model is running, interact with it: |
|
||||||
|
| | | ```plaintext |
|
||||||
|
| | | >>> Tell me about Space X. |
|
||||||
|
| | | Space X, the private aerospace company founded by Elon Musk, is revolutionizing space exploration... |
|
||||||
|
| | | ``` |
|
||||||
|
|
||||||
|
## Conclusion
|
||||||
|
With Ollama, running and interacting with models is seamless. Start experimenting today!
|
||||||
42
config.json
Normal file
42
config.json
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"_name_or_path": "unsloth/llama-3.2-1b-instruct-bnb-4bit",
|
||||||
|
"architectures": [
|
||||||
|
"LlamaForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_bias": false,
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"bos_token_id": 128000,
|
||||||
|
"eos_token_id": [
|
||||||
|
128001,
|
||||||
|
128008,
|
||||||
|
128009
|
||||||
|
],
|
||||||
|
"head_dim": 64,
|
||||||
|
"hidden_act": "silu",
|
||||||
|
"hidden_size": 2048,
|
||||||
|
"initializer_range": 0.02,
|
||||||
|
"intermediate_size": 8192,
|
||||||
|
"max_position_embeddings": 131072,
|
||||||
|
"mlp_bias": false,
|
||||||
|
"model_type": "llama",
|
||||||
|
"num_attention_heads": 32,
|
||||||
|
"num_hidden_layers": 16,
|
||||||
|
"num_key_value_heads": 8,
|
||||||
|
"pad_token_id": 128004,
|
||||||
|
"pretraining_tp": 1,
|
||||||
|
"rms_norm_eps": 1e-05,
|
||||||
|
"rope_scaling": {
|
||||||
|
"factor": 32.0,
|
||||||
|
"high_freq_factor": 4.0,
|
||||||
|
"low_freq_factor": 1.0,
|
||||||
|
"original_max_position_embeddings": 8192,
|
||||||
|
"rope_type": "llama3"
|
||||||
|
},
|
||||||
|
"rope_theta": 500000.0,
|
||||||
|
"tie_word_embeddings": true,
|
||||||
|
"torch_dtype": "float16",
|
||||||
|
"transformers_version": "4.47.1",
|
||||||
|
"unsloth_version": "2024.12.11",
|
||||||
|
"use_cache": true,
|
||||||
|
"vocab_size": 128256
|
||||||
|
}
|
||||||
1
configuration.json
Normal file
1
configuration.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}
|
||||||
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": "4.47.1"
|
||||||
|
}
|
||||||
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b56eb0e9c80cdaf3eef6cd4f5308ef0187e9cc770ea65f386e7ef3acd9efd902
|
||||||
|
size 2471645464
|
||||||
23
special_tokens_map.json
Normal file
23
special_tokens_map.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"bos_token": {
|
||||||
|
"content": "<|begin_of_text|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
},
|
||||||
|
"eos_token": {
|
||||||
|
"content": "<|eot_id|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
},
|
||||||
|
"pad_token": {
|
||||||
|
"content": "<|finetune_right_pad_id|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
tokenizer.json
(Stored with Git LFS)
Normal file
BIN
tokenizer.json
(Stored with Git LFS)
Normal file
Binary file not shown.
2065
tokenizer_config.json
Normal file
2065
tokenizer_config.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user