🚀 TinyLlama/TinyLlama-1.1B-Chat-v0.6-GGUF
本項目提供了來自 TinyLlama 的 TinyLlama-1.1B-Chat-v0.6 模型的量化 GGUF 文件。這些量化文件能在資源受限的環境中更高效地運行模型。
📦 模型信息
屬性 |
詳情 |
基礎模型 |
TinyLlama/TinyLlama-1.1B-Chat-v0.6 |
訓練數據集 |
cerebras/SlimPajama-627B、bigcode/starcoderdata、OpenAssistant/oasst_top1_2023-08-25 |
推理狀態 |
否 |
語言 |
英語 |
許可證 |
apache-2.0 |
模型創建者 |
TinyLlama |
模型名稱 |
TinyLlama-1.1B-Chat-v0.6 |
任務類型 |
文本生成 |
量化者 |
afrideva |
標籤 |
gguf、ggml、quantized、q2_k、q3_k_m、q4_k_m、q5_k_m、q6_k、q8_0 |
📋 量化模型文件列表
🔍 原始模型卡片
TinyLlama-1.1B
https://github.com/jzhang38/TinyLlama
TinyLlama 項目旨在使用 3 萬億個標記對一個 11 億參數的 Llama 模型進行預訓練。通過適當的優化,使用 16 塊 A100-40G GPU,我們可以在“僅” 90 天內完成這一目標 🚀🚀。訓練已於 2023 年 9 月 1 日開始。
我們採用了與 Llama 2 完全相同的架構和分詞器。這意味著 TinyLlama 可以直接應用於許多基於 Llama 的開源項目中。此外,TinyLlama 僅擁有 11 億參數,模型體積小巧。這種緊湊性使其能夠滿足許多對計算和內存要求較低的應用場景。
本模型介紹
這是一個基於 TinyLlama/TinyLlama-1.1B-intermediate-step-955k-2T 微調得到的聊天模型。我們遵循 HF 的 Zephyr 的訓練方法。該模型最初在 UltraChat
數據集的一個變體上進行微調,該數據集包含由 ChatGPT 生成的各種合成對話。
然後,我們使用 🤗 TRL 的 DPOTrainer
在 openbmb/UltraFeedback 數據集上進一步對齊模型,該數據集包含 64000 個由 GPT - 4 排名的提示和模型完成結果。
💻 使用示例
基礎用法
import torch
from transformers import pipeline
pipe = pipeline("text-generation", model="TinyLlama/TinyLlama-1.1B-Chat-v0.6", torch_dtype=torch.bfloat16, device_map="auto")
messages = [
{
"role": "system",
"content": "You are a friendly chatbot who always responds in the style of a pirate",
},
{"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
]
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
⚠️ 重要提示
你需要使用 transformers >= 4.34 版本。請查看 TinyLlama 的 GitHub 頁面以獲取更多信息。