neuralmagic / sparseml

Libraries for applying sparsification recipes to neural networks with a few lines of code, enabling faster and smaller models
Apache License 2.0
2.07k stars 148 forks source link

Fix Platypus template when there are no inputs #2296

Closed eldarkurtic closed 6 months ago

eldarkurtic commented 6 months ago

~80% of samples in the OpenPlatypus dataset (https://huggingface.co/datasets/garage-bAInd/Open-Platypus) have an empty input field which renders our samples in a weird format

Below is an instruction that describes a task, ...

### Instruction:
Write a C++ function that takes a reference to a std::string containing markdown formatted text and returns a std::string containing html formatted text.

### Input:

### Response:
Hello! I understand that you'd like a C++ ...

This PR fixes this by dropping the ### Input section if input field is empty. The sampled would look like this:

Below is an instruction that describes a task, ...

### Instruction:
Write a C++ function that takes a reference to a std::string containing markdown formatted text and returns a std::string containing html formatted text.

### Response:
Hello! I understand that you'd like a C++ ...