---
base_model: unsloth/qwen2-0.5b-bnb-4bit
language:
- en
license: apache-2.0
tags:
- text-generation-inference
- transformers
- unsloth
- qwen2
- trl
- sft
---
## For the first time after the fifth refinement using accumulated Lora, the AI managed to give me a Python code to train an AI offline. We are making progress with this model “Qwen2-0.5B,” which is so small and yet so powerful that it seems it will far surpass the TinyLlama 1.1B I was training for generating Python code. The detail is that TinyLlama is twice the size of this model, which has only 0.5B!

Setting `pad_token_id` to `eos_token_id`:151643 for open-end generation.
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
I need train a AI offline on my computer, give me a code.

### Input:


### Output:
The task is to write a Python program that trains an AI model on a specific dataset. The program should take the dataset as input and use the training data to train the model. The model should then be tested on a separate dataset to evaluate its performance. The program should output the accuracy of the model on the test dataset.

To accomplish this, you will need to follow these steps:
1. Import the necessary libraries for data manipulation and training.
2. Load the dataset into memory.
3. Split the dataset into training and testing sets.
4. Train the model on the training set.
5. Evaluate the model's performance on the testing set.
6. Calculate the accuracy of the model on the testing set.

Here is a sample code that demonstrates these steps:
```python
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn import svm

# Load the dataset
data = pd.read_csv('your_dataset.csv')

# Split the dataset into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(data.drop('target', axis=1), data['target'], test_size=0.2, random_state=42)

# Train the model
model = svm.SVC(kernel='linear', C=1.0)
model.fit(X_train, y_train)

# Evaluate the model's performance on the testing set
accuracy = model.score(X_test, y_test)
print('Accuracy of the model on the testing set:', accuracy)
´´´ 
In this code, we first load the dataset from the CSV file. Then, we split the dataset into training and testing sets. We train the model using the `train_test_split` function from scikit-learn, with a 20% split for the training set and 80% split for the testing set. We then evaluate the model's performance on the testing set and print the accuracy.<|endoftext|>
```

# Uploaded  model

- **Developed by:** Ramikan-BR
- **License:** apache-2.0
- **Finetuned from model :** unsloth/qwen2-0.5b-bnb-4bit

This qwen2 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.

[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
