Downloads · 30 days
24
7% of all-time downloads
haijian06/Yi-1.5-6B-Chat-Math
Yi-1.5-6B-Chat-Math 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.
Yi-1.5-6B-Chat-Math is a specialized natural language processing model fine-tuned from Yi-1.5 to excel in mathematical problem-solving and related tasks. Designed to handle a wide range of mathematical queries, from a…
Downloads · 30 days
24
7% of all-time downloads
All-time downloads
352
Public
Parameters
6.1B
12.1 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors12.1 GB · 100%
From the Hugging Face model README
Yi-1.5-6B-Chat-Math is a specialized natural language processing model fine-tuned from Yi-1.5 to excel in mathematical problem-solving and related tasks. Designed to handle a wide range of mathematical queries, from algebra and geometry to calculus and beyond, this model serves as a powerful tool for students, educators, and researchers alike.
The model has been fine-tuned using a custom dataset tailored for advanced mathematical tasks. The dataset is openly available for research and development purposes.
To get started with Yi-1.5-6B-Chat-Math, ensure you have the necessary dependencies installed:
pip install transformers torch
Below is a simple example demonstrating how to use the model for solving a mathematical equation:
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load the tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("haijian06/Yi-1.5-6B-Chat-Math")
model = AutoModelForCausalLM.from_pretrained("haijian06/Yi-1.5-6B-Chat-Math", torch_dtype=torch.float16, device_map="auto")
input_text = "Solve the equation x^2 - 5x + 6 = 0 Let's solve this step-by-step:"
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=200,
do_sample=True,
temperature=0.7,
top_p=0.95,
)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(answer)
Model answer:
Solve the equation x^2 - 5 x + 6 = 0 Let's solve this step-by-step:
Step 1: Factor the equation
The equation can be factored as follows:
x^2 - 5x + 6 = 0
(x - 2)(x - 3) = 0
Step 2: Apply the zero product property
If the product of two numbers is zero, then at least one of the numbers must be zero.
So, either (x - 2) = 0 or (x - 3) = 0
Step 3: Solve for x
If (x - 2) = 0, then x = 2
If (x - 3) = 0, then x = 3
So, the solutions are x = 2 and x = 3.
Answer: 2, 3
Contributions are welcome! Whether you have suggestions for improvements, bug reports, or want to contribute code, feel free to open an issue or submit a pull request on GitHub.
This project is licensed under the Apache-2.0 License.
For more information, support, or inquiries, please visit my GitHub profile: