初始化项目,由ModelHub XC社区提供模型
Model: afrideva/Phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-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
|
||||
phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2.fp16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2.Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2.Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2.Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
135
README.md
Normal file
135
README.md
Normal file
@@ -0,0 +1,135 @@
|
||||
---
|
||||
base_model: Bluckr/Phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2
|
||||
datasets:
|
||||
- Bluckr/function-calling-assistant-spanish-pofi-v2
|
||||
inference: true
|
||||
language:
|
||||
- es
|
||||
license: mit
|
||||
model_creator: Bluckr
|
||||
model_name: Phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2
|
||||
pipeline_tag: text-generation
|
||||
quantized_by: afrideva
|
||||
tags:
|
||||
- nlp
|
||||
- code
|
||||
- phi-3
|
||||
- chat
|
||||
- function-call
|
||||
- gguf
|
||||
- ggml
|
||||
- quantized
|
||||
widget:
|
||||
- messages:
|
||||
- content: '### Input: Que sabes hacer? ### Response:'
|
||||
role: user
|
||||
---
|
||||
|
||||
# Phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2-GGUF
|
||||
|
||||
Quantized GGUF model files for [Phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2](https://huggingface.co/Bluckr/Phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2) from [Bluckr](https://huggingface.co/Bluckr)
|
||||
|
||||
## Original Model Card:
|
||||
|
||||
<div style="text-align: center;">
|
||||
<img src="https://cdn-uploads.huggingface.co/production/uploads/64beeb8f4b4ff0d5097ddcfc/HF124f84-X7L_rPynRa4n.gif" alt="Pofi" width="300" style="display: block; margin: 0 auto;" />
|
||||
</div>
|
||||
|
||||
Phi 3 adjusted to behave like assistant Pofi, training data works with the function calling method.
|
||||
is a fine-tuned version of ["unsloth/Phi-3-mini-4k-instruct"](https://huggingface.co/unsloth/Phi-3-mini-4k-instruct)
|
||||
Pofi can:
|
||||
|
||||
| Utilities |
|
||||
|-----------------------------|
|
||||
| Setting alarms |
|
||||
| Connecting to the web |
|
||||
| Sending files |
|
||||
| Sending messages |
|
||||
| Saving strings of characters|
|
||||
| Opening applications |
|
||||
| Creating files |
|
||||
| Manipulating the system |
|
||||
|
||||
|
||||
## Simple Inference API
|
||||
```python
|
||||
import requests
|
||||
|
||||
API_URL = "https://api-inference.huggingface.co/models/Bluckr/Phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2"
|
||||
headers = {"Authorization": "Bearer %s"%token_id}
|
||||
def query(payload):
|
||||
response = requests.post(API_URL, headers=headers, json=payload)
|
||||
print(response.json())
|
||||
|
||||
prompt = """### Input: cómo te llamas? ### Response:"""
|
||||
|
||||
output = query({
|
||||
"inputs": prompt
|
||||
})
|
||||
```
|
||||
# Response
|
||||
```python
|
||||
[{'generated_text': '### Input: cómo te llamas? ### Response: soy Pofi.'}]
|
||||
```
|
||||
|
||||
|
||||
## Unsloth Inference
|
||||
```python
|
||||
%%capture
|
||||
# Installs Unsloth, Xformers (Flash Attention) and all other packages!
|
||||
!pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
|
||||
!pip install --no-deps "xformers<0.0.26" trl peft accelerate bitsandbytes
|
||||
```
|
||||
|
||||
```python
|
||||
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
|
||||
|
||||
### Instruction:
|
||||
{}
|
||||
|
||||
### Input:
|
||||
{}
|
||||
|
||||
### Response:
|
||||
{}"""
|
||||
```
|
||||
|
||||
|
||||
```python
|
||||
from unsloth import FastLanguageModel
|
||||
model, tokenizer = FastLanguageModel.from_pretrained(
|
||||
model_name = "Bluckr/Phi-3-mini-4k-instruct-function-calling-assistant-spanish-pofi-v2",
|
||||
max_seq_length = 2048,
|
||||
dtype = None,
|
||||
load_in_4bit = True,
|
||||
)
|
||||
FastLanguageModel.for_inference(model)
|
||||
```
|
||||
|
||||
```python
|
||||
inputs = tokenizer(
|
||||
[
|
||||
alpaca_prompt.format(
|
||||
"""""functions":[{'name': 'fnt_programa', 'description': 'el usuario solicita un programa.', 'parameters': [{'description': 'nombre del programa solicitado.', 'name': 'programa', 'required': True, 'type': 'string'}]},
|
||||
{'name': 'fnt_buscar_web', 'description': 'el usuario solicita una busqueda en internet.', 'parameters': [{'description': 'busqueda especifica.', 'name': 'busqueda', 'required': False, 'type': 'string'}, {'description': 'página especifica para la busqueda', 'name': 'sitio', 'required': False, 'type': 'string'}]},
|
||||
{'name': 'fnt_buscar_lugares', 'description': 'el usuario solicita la ubicación de un lugar.', 'parameters': [{'description': 'lugar especifico.', 'name': 'lugar', 'required': True, 'type': 'string'}, {'description': 'ubicación del lugar', 'name': 'ubicación', 'required': False, 'type': 'string'}]},
|
||||
{'name': 'fnt_enviar_mensajes', 'description': 'el usuario desea enviar un mensaje.', 'parameters': [{'description': 'el usuario especifica a quien enviar el mensaje.', 'name': 'destinatario', 'required': True, 'type': 'string'}, {'description': 'contenido que desea enviar el usuario', 'name': 'mensaje', 'required': True, 'type': 'string'}]},
|
||||
{'name': 'fnt_crear_archivo', 'description': 'el usuario desea crear un archivo.', 'parameters': [{'description': 'el usuario especifica el nombre del archivo.', 'name': 'nombre', 'required': False, 'type': 'string'}, {'description': 'ubicación donde se creará el archivo', 'name': 'ubicación', 'required': False, 'type': 'string'}, {'description': 'extensión del archivo', 'name': 'extensión', 'required': False, 'type': 'string'}]},
|
||||
{'name': 'fnt_establecer_alarma', 'description': 'el usuario desea una alarma o recordatorio', 'parameters': [{'description': 'el usuario especifica el nombre de la alarma.', 'name': 'nombre', 'required': False, 'type': 'string'}, {'description': 'hora de la alarma', 'name': 'hora', 'required': True, 'type': 'string'}, {'description': 'día que se activará la alarma', 'name': 'día', 'required': False, 'type': 'string'}]},
|
||||
{'name': 'fnt_enviar_archivos', 'description': 'el usuario solicita el envio de archivos.', 'parameters': [{'description': 'archivos especificos.', 'name': 'archivos', 'required': True, 'type': 'string'}, {'description': 'destino donde llegarán los archivos', 'name': 'destino', 'required': True, 'type': 'string'}]},
|
||||
{'name': 'fnt_guardar_valores', 'description': 'el usuario solicita almacenar valores.', 'parameters': [{'description': 'valor a almacenar.', 'name': 'valor', 'required': True, 'type': 'string'}, {'description': 'lugar de almacenamiento', 'name': 'lugar', 'required': False, 'type': 'string'}]},
|
||||
{'name': 'fnt_hora', 'description': 'el usuario solicita la hora', 'parameters': [{'description': 'ubicación donde la hora es solicitada.', 'name': 'ubicacion', 'required': True, 'type': 'string'}]},
|
||||
{'name': 'fnt_clima', 'description': 'el usuario solicita el clima', 'parameters': [{'description': 'ubicación donde se solicita el clima.', 'name': 'ubicacion', 'required': True, 'type': 'string'}]},
|
||||
{'name': 'fnt_significado', 'description': 'el usuario solicita el significado de una palabra', 'parameters': [{'description': 'palabra solicitada.', 'name': 'palabra', 'required': True, 'type': 'string'}]},""", # instruction
|
||||
"Pofi envia el archivo de selfie.jpg a drive", # input
|
||||
"", # output - leave this blank for generation!
|
||||
)
|
||||
], return_tensors = "pt").to("cuda")
|
||||
|
||||
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
|
||||
tokenizer.batch_decode(outputs)
|
||||
```
|
||||
# Response
|
||||
```python
|
||||
Response:\nEnviando el archivo de selfie.jpg a drive.{"function_call":{"name":"fnt_enviar_archivos","arguments":{"archivos":"selfie.jpg","destino":"drive"}}}<|endoftext|>']
|
||||
```
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f319f6a4602ea03359b4d3219b5fc2b0351847469782edc3f1d7c8ea2fc09772
|
||||
size 1446880032
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a3ee1c5cd077e9b8cad18a85fe3e5591d4b57b8c2e5128586ccd4326d79409ca
|
||||
size 1877625120
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:109d16271dd7775051079bbe3b343d5493ae8444f767b49e4fbc2e2315ae22d1
|
||||
size 2318919456
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b03d9a49d7151661ef79e7c6f23a6c19820ad3e30031f8298c2e9dd846de3d4a
|
||||
size 2715010848
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b5443bffaf67c6e294908067c7291d5a086798e0ad9cb7614d5444e55cbf964b
|
||||
size 3135857952
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8a86e19cd46c02e25cd60afae75c51f79040a926479240ed795eb88d627c2d15
|
||||
size 4061227296
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:86f12d19bf3bd2a42e55c456d029d13f7a8bdd57f5862830ffddd44eb658d67b
|
||||
size 7643302144
|
||||
Reference in New Issue
Block a user