Finetune NousResearch/Hermes-2-Pro-Llama-3-8B dataset

#27
by Akhilraju - opened

I want to create a fine-tune dataset that can output json. After looking into your jsonmode.py,
should the dataset be
Option 1:

{
Promt:
"[INST] <<SYS>>
You are a helpful assistant that answers in JSON. Here's the JSON schema you must adhere to:
<schema>
{pydantic_schema}
</schema>
<</SYS>>
The BMW has 2 doors at the back and a bonet. The Policy Number is 2436
[/INST]"

completion:"{
  "Car_model": BMW,
  "PolicyNumber": 2436,
  "Bonet": True,
}"
}

Option 2:

{
  "prompt": "System: You are a helpful assistant that answers in JSON. Here's the json schema you must adhere to:\n
<schema>
{schema}
</schema>

\n\n
User: The BMW has 2 doors at the back and a bonet. The Policy Number is 2436
\n\n

Assistant:",

  "completion": "{"Car_model": BMW,  "PolicyNumber": 2436,  "Bonet": True,}"
}

Which is the suitable way to create datase to finetune the model for the json output?

Option 2 looks close but not quite right.

However, NousResearch already have a dataset you could either use on it's own or as a template to construct your own: hermes-function-calling-v1.

For json specifically you want one of the json mode subsets

Have you noticed any specific patterns in token consumption when using this model for inference? I've observed slight variations in input length handling compared to its predecessors, particularly with longer prompts. Would be useful to gather more data points on optimal prompt structuring for efficiency.

How does the model handle prompt templates with nested JSON structures? Specifically, does it reliably parse and maintain tool-call structure when prompts include dynamic fields like action and arguments? I’ve seen inconsistent tool-call stability in similar setups—any observed behavior with token-by-token parsing or prompt length thresholds? Also, how does 4-bit quantization affect stability when processing long chains of tool calls?

Sign up or log in to comment