Downloads · 30 days
18
5% of all-time downloads
haijian06/Yi-1.5-6B-Chat-Agent_sft
Yi-1.5-6B-Chat-Agent_sft is a text generation model from haijian06. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
The haijian06/Yi-1.5-6B-Chat-Agentsft model is an advanced conversational agent built upon the Yi-1.5-6B-Chat model. This model has been fine-tuned to enhance its capabilities in handling agent tasks and function call…
Downloads · 30 days
18
5% of all-time downloads
All-time downloads
342
Public
Parameters
6.1B
12.1 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors12.1 GB · 100%
From the Hugging Face model README
The haijian06/Yi-1.5-6B-Chat-Agent_sft model is an advanced conversational agent built upon the Yi-1.5-6B-Chat model. This model has been fine-tuned to enhance its capabilities in handling agent tasks and function calls, making it a versatile tool for a variety of applications.
To use this model, you need to have Python and the necessary libraries installed. You can install the required dependencies using the following commands:
pip install torch transformers
Here is a basic example of how to use the haijian06/Yi-1.5-6B-Chat-Agent_sft model:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load the model and tokenizer
model_name = "haijian06/Yi-1.5-6B-Chat-Agent_sft"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Generate a response
input_text = "Hello, how can I assist you today?"
input_ids = tokenizer.encode(input_text, return_tensors='pt')
with torch.no_grad():
output = model.generate(input_ids, max_length=50)
response = tokenizer.decode(output[0], skip_special_tokens=True)
print(response)
To fine-tune this model on your own dataset, follow these steps:
Trainer class from the transformers library for training.Example training script:
from transformers import Trainer, TrainingArguments
training_args = TrainingArguments(
output_dir='./results',
num_train_epochs=3,
per_device_train_batch_size=4,
per_device_eval_batch_size=4,
warmup_steps=500,
weight_decay=0.01,
logging_dir='./logs',
)
trainer = Trainer(
model=model,
args=training_args,
train_dataset=train_dataset,
eval_dataset=eval_dataset
)
trainer.train()
Contributions are welcome! Please fork this repository and submit a pull request with your improvements.
This work is a derivative of Yi-1.5-6B by 01.AI, used under the Apache 2.0 License.
This model is built upon the Yi-1.5-6B-Chat model. Special thanks to the developers and contributors of the original model.
For more information, please visit our GitHub repository.