https://github.com/francescodisalesgithub/few-shots-importer
sft training by using only command instruction on a ollama modelfile
https://github.com/francescodisalesgithub/few-shots-importer
ai hack modelfile ollama sft supervised-learning training
Last synced: 4 months ago
JSON representation
sft training by using only command instruction on a ollama modelfile
- Host: GitHub
- URL: https://github.com/francescodisalesgithub/few-shots-importer
- Owner: FrancescoDiSalesGithub
- License: gpl-3.0
- Created: 2025-02-08T09:58:55.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-16T15:26:33.000Z (4 months ago)
- Last Synced: 2025-02-16T16:33:55.754Z (4 months ago)
- Topics: ai, hack, modelfile, ollama, sft, supervised-learning, training
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# few-shots-importer
does a few shots prompt by using command instruction on a ollama modelfile# How to create the dataset
It is important to create a json like the following:
```
{"prompts":[
{"who is the famous superhero that climbs on walls?":"spiderman"},
{"who is the famous superhero that turns green when he is angry?":"HULK"}
]}
```
# How to run
Just run the python script as the following:```
python3 few-shots-importer.py OLLAMA_MODEL PATH_MODELFILE your-dataset.json```
Where:
* OLLAMA_MODEL is the model you are going to use (mistral,deepseek,qwen and so on)
* PATH_MODELFILE the path where the new generated modelfile will be savedExample:
```
python3 few-shot-importer.py mistral /home/myuser/Modelfile dataset.json```