/ Модель

Характеристики

Лицензия
Llama 3.1
Базовая модель
Meta-Llama-3.1-8B-Instruct
Библиотека
transformers
Опубликована
30 июл 2024

Llama3.1-8B-Chinese-Chat-GGUF

Генерация текстаТекст → текст11 профессий

QuantFactory/Llama3.1-8B-Chinese-Chat-GGUF — квантизированная версия модели Llama3.1-8B-Chinese-Chat, созданная с использованием llama.cpp на основе Meta-Llama-3.1-8B-Instruct.

1 355скачиваний за 30 дней6лайковвеса обновлены30 июл 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Исходную модель разработали Shenzhi Wang, Yaowei Zheng, Guoyin Wang, Shiji Song и Gao Huang; равный вклад указан для первых двух авторов.

Модель предназначена для генерации текста и диалоговых сценариев на китайском и английском языках. Она ориентирована на ролевое взаимодействие, использование инструментов и function calling, а также задачи, связанные с математикой. Дообучение выполнено методом ORPO с использованием LLaMA-Factory на более чем 100 тысячах пар предпочтений. Размер модели составляет около 8,03 млрд параметров, заявленная длина контекста — до 128K токенов, однако для китайской версии она не была протестирована; длина контекста при дообучении составляла 8192 токена.

Главное преимущество модели — адаптация Llama 3.1 для китайско-английских пользователей и наличие GGUF-квантизации, упрощающей локальный запуск через llama.cpp или LM Studio. Ограничения включают непроверенную заявленную длину контекста для этой версии и возможные неточные ответы на вопросы о собственной идентичности и разработчиках. Модель распространяется по лицензии Llama 3.1.

Для каких профессий подходит11

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

QuantFactory/Llama3.1-8B-Chinese-Chat-GGUF

This is quantized version of shenzhi-wang/Llama3.1-8B-Chinese-Chat created using llama.cpp

Original Model Card

[!CAUTION] For optimal performance, we refrain from fine-tuning the model's identity. Thus, inquiries such as "Who are you" or "Who developed you" may yield random responses that are not necessarily accurate.

[!IMPORTANT] If you enjoy our model, please give it a star on our Hugging Face repo and kindly cite our model. Your support means a lot to us. Thank you!

Updates

Model Summary

llama3.1-8B-Chinese-Chat is an instruction-tuned language model for Chinese & English users with various abilities such as roleplaying & tool-using built upon the Meta-Llama-3.1-8B-Instruct model.

Developers: Shenzhi Wang*, Yaowei Zheng*, Guoyin Wang (in.ai), Shiji Song, Gao Huang. (*: Equal Contribution)

1. Introduction

This is the first model specifically fine-tuned for Chinese & English users based on the Meta-Llama-3.1-8B-Instruct model. The fine-tuning algorithm used is ORPO [1].

[1] Hong, Jiwoo, Noah Lee, and James Thorne. "Reference-free Monolithic Preference Optimization with Odds Ratio." arXiv preprint arXiv:2403.07691 (2024).

Training framework: LLaMA-Factory.

Training details:

  • epochs: 3
  • learning rate: 3e-6
  • learning rate scheduler type: cosine
  • Warmup ratio: 0.1
  • cutoff len (i.e. context length): 8192
  • orpo beta (i.e. $\lambda$ in the ORPO paper): 0.05
  • global batch size: 128
  • fine-tuning type: full parameters
  • optimizer: paged_adamw_32bit

2. Usage

2.1 Usage of Our BF16 Model

  1. Please upgrade the transformers package to ensure it supports Llama3.1 models. The current version we are using is 4.43.0.

  2. Use the following Python script to download our BF16 model

from huggingface_hub import snapshot_download
snapshot_download(repo_id="shenzhi-wang/Llama3.1-8B-Chinese-Chat", ignore_patterns=["*.gguf"])  # Download our BF16 model without downloading GGUF models.
  1. Inference with the BF16 model
import torch
import transformers
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "/Your/Local/Path/to/Llama3.1-8B-Chinese-Chat"
dtype = torch.bfloat16

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="cuda",
    torch_dtype=dtype,
)

chat = [
    {"role": "user", "content": "写一首关于机器学习的诗。"},
]
input_ids = tokenizer.apply_chat_template(
    chat, tokenize=True, add_generation_prompt=True, return_tensors="pt"
).to(model.device)

outputs = model.generate(
    input_ids,
    max_new_tokens=8192,
    do_sample=True,
    temperature=0.6,
    top_p=0.9,
)
response = outputs[0][input_ids.shape[-1] :]
print(tokenizer.decode(response, skip_special_tokens=True))

2.2 Usage of Our GGUF Models

  1. Download our GGUF models from the gguf_models folder;
  2. Use the GGUF models with LM Studio;
  3. You can also follow the instructions from https://github.com/ggerganov/llama.cpp/tree/master#usage to use gguf models.

Citation

If our Llama3.1-8B-Chinese-Chat is helpful, please kindly cite as:

@misc {shenzhi_wang_2024,
	author       = { Wang, Shenzhi and Zheng, Yaowei and Wang, Guoyin and Song, Shiji and Huang, Gao },
	title        = { Llama3.1-8B-Chinese-Chat },
	year         = 2024,
	url          = { https://huggingface.co/shenzhi-wang/Llama3.1-8B-Chinese-Chat },
	doi          = { 10.57967/hf/2779 },
	publisher    = { Hugging Face }
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

llama.cpp

Нельзя запустить

GGUF-модель ждёт проверки: нужно выбрать файл кванта под доступные GPU.

Ревизия весов
01ee11a

0 моделей