Hello HF Community!
I fine-tuned the both meta-llama/Meta-Llama-3.1-8B-Instruct
& meta-llama/Meta-Llama-3.1-8B
model with 4bit
quantization after loading the model and testing the model the LLM responding from the adapter_model.safetensor
only. because If I ask simple question like hi, How are you?
its respond in SQL query. the reason is I used a text-to-sql
dataset. that’s why its giving the SQL query.
Data Structure
alpaca_prompt = """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:
{}
### Input:
{}
### Response:
{}"""
alpaca_prompt_without_input = """You are a ERPNext database expert helping people with SQL query. Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
{}
### Response:
{}"""
The above format is inspired from the Unsloth Alpaca
format.
Sample Dataset
Below format is used to pass the inside the llm.
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:
Who created the nominee records for employee EMP-005?
### Input:
This query retrieves the details of all nominee records created for the employee identified by 'EMP-005'. The query joins the `tabNominee Form` table with the `tabEmployee` table using the `parent` column from `tabNominee Form` and the `name` column from `tabEmployee`.
The `name` column in the `tabEmployee` table is designated as the primary key (`PRIMARY KEY`) and has a data type of `VARCHAR(140)`, which uniquely identifies each employee record. This ensures that each employee record can be accurately linked to their corresponding nominee records. The `parent` column in the `tabNominee Form` table is a `VARCHAR(140)` field that acts as a foreign key, linking each nominee record to its respective employee.
The selected columns from the `tabNominee Form` table include `nominee_name`, `creation`, and `owner`. The `nominee_name` column, a `VARCHAR(140)` field, is chosen to display the name of each nominee. The `creation` column, which has a data type of `DATETIME`, records the date and time when each nominee record was first created. This field is automatically set by the system and does not change, providing a reliable timestamp for tracking when the records were initially created. The `owner` column, a `VARCHAR(140)` field, stores the identifier of the user who created each nominee record. This column links to the `tabUser` table, ensuring accountability and transparency by recording who created the nominee records.
The `WHERE` clause filters the results to include only the nominee records associated with 'EMP-005'. By selecting these specific columns, the query provides a comprehensive list of nominee records, including the creation timestamp and the user who created each record, ensuring that the result is both precise and informative.
In summary, this query effectively retrieves a list of all nominee records created for the specified employee, leveraging the `creation` and `owner` columns to provide detailed information about the creation of each record. The use of the `JOIN` operation ensures that the result accurately reflects the relationships between the employee and their nominees.
### Response:
SELECT
nf.nominee_name,
nf.creation,
nf.owner
FROM
`tabNominee Form` nf
JOIN tabEmployee e ON e.name = nf.parent
WHERE e.name = 'EMP-005';<|end_of_text|>
Please help me to find the root cause. thank you.