初始化项目,由ModelHub XC社区提供模型
Model: afrideva/dolphin-2_6-phi-2_oasst2_chatML_V2-GGUF Source: Original Platform
This commit is contained in:
42
.gitattributes
vendored
Normal file
42
.gitattributes
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
*.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
|
||||||
|
dolphin-2_6-phi-2_oasst2_chatml_v2.fp16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
dolphin-2_6-phi-2_oasst2_chatml_v2.q2_k.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
dolphin-2_6-phi-2_oasst2_chatml_v2.q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
dolphin-2_6-phi-2_oasst2_chatml_v2.q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
dolphin-2_6-phi-2_oasst2_chatml_v2.q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
dolphin-2_6-phi-2_oasst2_chatml_v2.q6_k.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
dolphin-2_6-phi-2_oasst2_chatml_v2.q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
174
README.md
Normal file
174
README.md
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
---
|
||||||
|
base_model: NickyNicky/dolphin-2_6-phi-2_oasst2_chatML_V2
|
||||||
|
inference: false
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
- es
|
||||||
|
- ru
|
||||||
|
- zh
|
||||||
|
- de
|
||||||
|
- fr
|
||||||
|
- th
|
||||||
|
- ca
|
||||||
|
- it
|
||||||
|
- ja
|
||||||
|
- pl
|
||||||
|
- eo
|
||||||
|
- eu
|
||||||
|
- vi
|
||||||
|
- fi
|
||||||
|
- hu
|
||||||
|
- ar
|
||||||
|
- nl
|
||||||
|
- da
|
||||||
|
- tr
|
||||||
|
- ko
|
||||||
|
- he
|
||||||
|
- id
|
||||||
|
- cs
|
||||||
|
- bn
|
||||||
|
- sv
|
||||||
|
model_creator: NickyNicky
|
||||||
|
model_name: dolphin-2_6-phi-2_oasst2_chatML_V2
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
quantized_by: afrideva
|
||||||
|
tags:
|
||||||
|
- gguf
|
||||||
|
- ggml
|
||||||
|
- quantized
|
||||||
|
- q2_k
|
||||||
|
- q3_k_m
|
||||||
|
- q4_k_m
|
||||||
|
- q5_k_m
|
||||||
|
- q6_k
|
||||||
|
- q8_0
|
||||||
|
---
|
||||||
|
# NickyNicky/dolphin-2_6-phi-2_oasst2_chatML_V2-GGUF
|
||||||
|
|
||||||
|
Quantized GGUF model files for [dolphin-2_6-phi-2_oasst2_chatML_V2](https://huggingface.co/NickyNicky/dolphin-2_6-phi-2_oasst2_chatML_V2) from [NickyNicky](https://huggingface.co/NickyNicky)
|
||||||
|
|
||||||
|
|
||||||
|
| Name | Quant method | Size |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| [dolphin-2_6-phi-2_oasst2_chatml_v2.fp16.gguf](https://huggingface.co/afrideva/dolphin-2_6-phi-2_oasst2_chatML_V2-GGUF/resolve/main/dolphin-2_6-phi-2_oasst2_chatml_v2.fp16.gguf) | fp16 | 5.56 GB |
|
||||||
|
| [dolphin-2_6-phi-2_oasst2_chatml_v2.q2_k.gguf](https://huggingface.co/afrideva/dolphin-2_6-phi-2_oasst2_chatML_V2-GGUF/resolve/main/dolphin-2_6-phi-2_oasst2_chatml_v2.q2_k.gguf) | q2_k | 1.09 GB |
|
||||||
|
| [dolphin-2_6-phi-2_oasst2_chatml_v2.q3_k_m.gguf](https://huggingface.co/afrideva/dolphin-2_6-phi-2_oasst2_chatML_V2-GGUF/resolve/main/dolphin-2_6-phi-2_oasst2_chatml_v2.q3_k_m.gguf) | q3_k_m | 1.49 GB |
|
||||||
|
| [dolphin-2_6-phi-2_oasst2_chatml_v2.q4_k_m.gguf](https://huggingface.co/afrideva/dolphin-2_6-phi-2_oasst2_chatML_V2-GGUF/resolve/main/dolphin-2_6-phi-2_oasst2_chatml_v2.q4_k_m.gguf) | q4_k_m | 1.79 GB |
|
||||||
|
| [dolphin-2_6-phi-2_oasst2_chatml_v2.q5_k_m.gguf](https://huggingface.co/afrideva/dolphin-2_6-phi-2_oasst2_chatML_V2-GGUF/resolve/main/dolphin-2_6-phi-2_oasst2_chatml_v2.q5_k_m.gguf) | q5_k_m | 2.07 GB |
|
||||||
|
| [dolphin-2_6-phi-2_oasst2_chatml_v2.q6_k.gguf](https://huggingface.co/afrideva/dolphin-2_6-phi-2_oasst2_chatML_V2-GGUF/resolve/main/dolphin-2_6-phi-2_oasst2_chatml_v2.q6_k.gguf) | q6_k | 2.29 GB |
|
||||||
|
| [dolphin-2_6-phi-2_oasst2_chatml_v2.q8_0.gguf](https://huggingface.co/afrideva/dolphin-2_6-phi-2_oasst2_chatML_V2-GGUF/resolve/main/dolphin-2_6-phi-2_oasst2_chatml_v2.q8_0.gguf) | q8_0 | 2.96 GB |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Original Model Card:
|
||||||
|
```
|
||||||
|
- model fine tune base: cognitivecomputations/dolphin-2_6-phi-2
|
||||||
|
- sft
|
||||||
|
- flash-attention 2
|
||||||
|
- loss: 0.85
|
||||||
|
- steps: 3000
|
||||||
|
- max_length: 2028
|
||||||
|
- neftune_noise_alpha: 5
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Install packages
|
||||||
|
```Python
|
||||||
|
!python -m pip install --upgrade pip
|
||||||
|
!pip install -q datasets trl peft bitsandbytes sentencepiece wandb
|
||||||
|
!pip install -q accelerate safetensors deepspeed
|
||||||
|
!pip install -q scipy
|
||||||
|
|
||||||
|
!export CUDA_HOME=/usr/local/cuda-11.8
|
||||||
|
# !pip install ninja
|
||||||
|
!pip install ninja packaging --upgrade -qqq
|
||||||
|
!MAX_JOBS=4 pip install flash-attn --no-build-isolation -qqq
|
||||||
|
!pip install git+"https://github.com/HazyResearch/flash-attention.git#subdirectory=csrc/rotary" -qqq
|
||||||
|
!python -m pip install optimum -qqq
|
||||||
|
```
|
||||||
|
|
||||||
|
Ioad model and generate text
|
||||||
|
```Python
|
||||||
|
|
||||||
|
from transformers import (
|
||||||
|
AutoModelForCausalLM,
|
||||||
|
AutoTokenizer,
|
||||||
|
BitsAndBytesConfig,
|
||||||
|
HfArgumentParser,
|
||||||
|
TrainingArguments,
|
||||||
|
pipeline,
|
||||||
|
logging,
|
||||||
|
GenerationConfig,
|
||||||
|
TextIteratorStreamer,
|
||||||
|
)
|
||||||
|
# from attention_sinks import AutoModelForCausalLM
|
||||||
|
|
||||||
|
import torch
|
||||||
|
|
||||||
|
model_id = "NickyNicky/dolphin-2_6-phi-2_oasst2_chatML_V2"
|
||||||
|
|
||||||
|
model = AutoModelForCausalLM.from_pretrained(model_id,
|
||||||
|
device_map="auto",
|
||||||
|
trust_remote_code=True,
|
||||||
|
torch_dtype=torch.bfloat16,
|
||||||
|
load_in_4bit=True,
|
||||||
|
low_cpu_mem_usage= True,
|
||||||
|
flash_attn=True,
|
||||||
|
flash_rotary=True,
|
||||||
|
fused_dense=True,
|
||||||
|
)
|
||||||
|
max_length=2028
|
||||||
|
print("max_length",max_length)
|
||||||
|
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_id,
|
||||||
|
use_fast = True,
|
||||||
|
max_length=max_length,
|
||||||
|
trust_remote_code=True,)
|
||||||
|
|
||||||
|
prompt= """<|im_start|>system
|
||||||
|
You are a helpful AI assistant.<|im_end|>
|
||||||
|
<|im_start|>user
|
||||||
|
tengo hambre que me recomiendas<|im_end|>
|
||||||
|
<|im_start|>assistant"""
|
||||||
|
|
||||||
|
inputs = tokenizer.encode(prompt,
|
||||||
|
return_tensors="pt",
|
||||||
|
add_special_tokens=False).cuda()#.to("cuda") # False # True
|
||||||
|
|
||||||
|
generation_config = GenerationConfig(
|
||||||
|
max_new_tokens=700,
|
||||||
|
temperature=0.5,
|
||||||
|
top_p=0.9,
|
||||||
|
top_k=45,
|
||||||
|
repetition_penalty=1.15, #1.1, # 1.0 means no penalty, > 1.0 means penalty, 1.2 from CTRL paper
|
||||||
|
do_sample=True,
|
||||||
|
pad_token_id=tokenizer.eos_token_id,
|
||||||
|
eos_token_id=tokenizer.eos_token_id,
|
||||||
|
# bos_token_id=tokenizer.eos_token_id,
|
||||||
|
# use_cache=True,
|
||||||
|
# stopping_criteria= StoppingCriteriaList([stopping_criteria]),
|
||||||
|
)
|
||||||
|
|
||||||
|
outputs = model.generate(generation_config=generation_config,
|
||||||
|
input_ids=inputs,)
|
||||||
|
# tokenizer.decode(outputs[0], skip_special_tokens=False) #True
|
||||||
|
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
|
||||||
|
|
||||||
|
'''OUTPUT:
|
||||||
|
<|im_start|>system
|
||||||
|
You are a helpful AI assistant.<|im_end|>
|
||||||
|
<|im_start|>user
|
||||||
|
tengo hambre que me recomiendas<|im_end|>
|
||||||
|
<|im_start|>assistant
|
||||||
|
Hay muchos tipos de alimentos que puedes probar si tienes hambre, pero aquí te muestro una lista ordenada por calor:
|
||||||
|
|
||||||
|
1- Frutas y verduras: Estas son buena opción para quitar hambre sin agotar tu cuerpo con grandes cantidades de carbohidratos. Algunas frutas y verduras que podrían ser suficientemente altas en calor durante el día incluyen tomates, plátanos, espinacas, papas, nueces, manzanas, limones, guisantes, cucumbers, zanahorias, etc.
|
||||||
|
2- Proteínas: Estas son importantes para mantener tu masa muscular y fuerzosa durante el día. Algunas proteínas que podrían ser útiles para quitar hambre durante el día incluyen carne, aceite de oliva, miel, yogur, leche fresca o sopa de gorditas, etc.
|
||||||
|
3- Carbohidratos: Estas son importantes para energizarte durante el día y mantenerte físico. Algunas frutas y verduras que podrían ser útiles para quitar hambre durante el día incluyen pan, tortillas, roti, arroz, pasta, rice, polenta, cereales, granola, etc.
|
||||||
|
4- Grains: Estas son importantes para mantenerte satiente durante el día y reducir la frecuencia de comidas rápida. Algunas gromas que podrían ser útiles para quitar hambre durante el día incluyen lentejas, farinas, tortilla, ensalada, etc.
|
||||||
|
5- Nuts y semolina: Estas son buenas opciones para quitar hambre durante el día sin agotar tu cuerpo con grandes cantidades de azúcar. Algunas frutas y verduras que podrían ser útiles para quitar hambre durante el día incluyen anacardios, almendras, macetas, bocaditos, panquesado, etc.
|
||||||
|
6- Papel picado: Esta es una opción deliciosa y económica que puedes preparar en caso de quitar hambre durante el día. Para hacer papel picado, primero cortezamos las frutas y verduras que deseas usarlas, y luego cortezamos las frutas y verduras que no deseas usarlas. A continuación, cortezamos las frutas y verduras que deseas usarlas más grandes y que estén más frescas, y luego cortezamos las frutas y verduras
|
||||||
|
'''
|
||||||
|
```
|
||||||
3
dolphin-2_6-phi-2_oasst2_chatml_v2.fp16.gguf
Normal file
3
dolphin-2_6-phi-2_oasst2_chatml_v2.fp16.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9c6f1fba99529e8d08c13c328ca32b7d2bcb2526b37a7ecf1cdb1ef3111aae38
|
||||||
|
size 5563089056
|
||||||
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q2_k.gguf
Normal file
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q2_k.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7d02d801963430a5a5c865cc6b39f895597ab6f2a0282ac413289a79a84292e1
|
||||||
|
size 1088413920
|
||||||
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q3_k_m.gguf
Normal file
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q3_k_m.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1e7dee39cb9c465c2a0d335fb64f8fbb1648c96bf6fe7576054c5f4abb28f76c
|
||||||
|
size 1486749920
|
||||||
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q4_k_m.gguf
Normal file
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q4_k_m.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b45fe17acd0282a2e9cb8c657e4c7f9b4737cda45b2d69501d780ac86b613c06
|
||||||
|
size 1789239520
|
||||||
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q5_k_m.gguf
Normal file
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q5_k_m.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cedee7184c51ccb9ed63ae02ffa25d73844d73ac0c41cb0305702bb40c76e7cf
|
||||||
|
size 2072682720
|
||||||
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q6_k.gguf
Normal file
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q6_k.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4c20b10748f2a5c5a724acb89a6aaa52165c37c6354445389c6a813f57496aa0
|
||||||
|
size 2285060320
|
||||||
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q8_0.gguf
Normal file
3
dolphin-2_6-phi-2_oasst2_chatml_v2.q8_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4e443b16314276e399e529df3151ac7461c6bbcbfdbb861798d15a2cf39bee66
|
||||||
|
size 2958033120
|
||||||
Reference in New Issue
Block a user