Edit model card

AXCXEPT/EZO-AutoCoTRAG-Qwen2.5-72B-Instruct_q4

image/png

Introduction

This model is based on “https://huggingface.co/AXCXEPT/EZO-Qwen2.5-72B-Instruct” and automatically performs “Chain-Of-Thought” and “RAG” as custom processing to compensate for knowledge that LLM itself does not have This is an LLM with additional custom processing. Base model: “AXCXEPT/EZO-Qwen2.5-72B-Instruct” is based on Qwen/Qwen2.5-72B-Instruct with multiple tunings to improve overall performance from the Base model.

このモデルは、「 https://huggingface.co/AXCXEPT/EZO-Qwen2.5-72B-Instruct 」 をベースとして、カスタム処理として「Chain-Of-Thought」と「RAG」を自動で行い、LLM自身が持っていない知識を補うカスタムの処理を追加したLLMです。 ベースとなるモデル:「AXCXEPT/EZO-Qwen2.5-72B-Instruct」は、Qwen/Qwen2.5-72B-Instructをベースに複数のチューニングを施し、Baseモデルから総合的なパフォーマンスを向上させたモデルです。

[Auto CoT RAG]

image/png

Auto-CoT-RAG (Automatic Chain of Thought with Real-time Augmented Generation) technology is implemented. In addition to providing a multi-faceted mechanism for internalizing Internet search results, which are often incorporated into systems, it also realizes manual chain of thought processing for internal processing. This is an LLM x program style technique. Auto-CoT (Chain of Thought): internally deepens thinking through multiple steps, allowing for more complex reasoning. Real-time Knowledge Augmentation (RAG): allows users to go beyond the limits of trained data and perform web searches in real time to incorporate the latest information.

Auto-CoT-RAG(Automatic Chain of Thought with Real-time Augmented Generation)技術を実装しています。システムとして組み込むことの多い、インターネット検索結果を内包し多仕組みを提供するほか、内部処理に手思考の連鎖処理を実現しています。これはLLM×プログラムというスタイルの手法です。

自動思考連鎖(Auto-CoT):内部的に複数のステップを踏んで思考を深化させ、より複雑な推論を可能にします。

リアルタイム知識拡張(RAG):学習済みデータの限界を超え、リアルタイムでウェブ検索を行い最新の情報を取り込むことができます。

[Usage]

Here provides a code snippet with apply_chat_template to show you how to load the tokenizer and model and how to generate contents.

pip install bitsandbytes transformers accelerate duckduckgo_search
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_name = "AXCXEPT/EZO-AutoCoTRAG-Qwen2.5-72B-Instruct_q4"

model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
model.set_tokenizer(tokenizer)

#================================================
# You can change max think count(default:=5):
model.set_max_iterations(2)
# You can change using RAG(default:=True)
model.set_use_search(True)
# You can change using RAG-top-k(default:=3)
model.set_top_k(3)
#================================================

prompt = "Who will be President of the United States in 2024?"
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt")

generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=512
)

# decode 
full_generated_text = tokenizer.decode(generated_ids[0], skip_special_tokens=True)

# Find latest Assistant:
assistant_token = "Assistant:"
last_assistant_index = full_generated_text.rfind(assistant_token)

if last_assistant_index != -1:
    # Select last word of 'Assistant:'
    response = full_generated_text[last_assistant_index + len(assistant_token):].strip()
else:
    # If 'Assistant:' is not found, use full text
    response = full_generated_text.strip()

print(response)

[Disclaimer]

このモデルは研究開発のみを目的として提供されるものであり、実験的なプロトタイプとみなされるべきモデルです。 商業的な使用やミッションクリティカルな環境への配備を意図したものではありません。 本モデルの使用は、使用者の責任において行われるものとし、その性能および結果は保証されません。 Axcxept株式会社は、直接的、間接的、特別、偶発的、結果的な損害、または本モデルの使用から生じるいかなる損失に対しても、得られた結果にかかわらず、一切の責任を負いません。 利用者は、本モデルの使用に伴うリスクを十分に理解し、自己の判断で使用するものとします。

[謝辞/thanks]

We would like to express our gratitude and respect to Alibaba Cloud and the team of developers who developed this base model, as well as to the many others who contributed to the automated evaluation methodology. 本ベースモデルを開発してくださったAlibaba Cloud社ならびに当該チームの開発者の方々、また自動評価の手法を提供してくださった多数の方々に感謝と尊敬の意を表します。

Company:

Axcxept co., ltd. Axcxept logo

Downloads last month
50
Safetensors
Model size
38.7B params
Tensor type
F32
·
BF16
·
U8
·
Inference Examples
Unable to determine this model's library. Check the docs .

Model tree for AXCXEPT/EZO-AutoCoTRAG-Qwen2.5-72B-Instruct_q4

Base model

Qwen/Qwen2.5-72B
Quantized
(1)
this model

Collections including AXCXEPT/EZO-AutoCoTRAG-Qwen2.5-72B-Instruct_q4