Last active
February 28, 2025 13:10
-
-
Save davidberenstein1957/3f20046ce57395a6aba13f8b4e956b59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /// script | |
# requires-python = ">=3.11,<3.12" | |
# dependencies = [ | |
# "distilabel[hf-transformers, hf-inference-endpoints]", | |
# ] | |
# /// | |
from distilabel.models import InferenceEndpointsLLM | |
from distilabel.pipeline import InstructionResponsePipeline | |
repo_id = "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" | |
llm = InferenceEndpointsLLM( | |
model_id=repo_id, | |
tokenizer_id=repo_id, | |
magpie_pre_query_template="<|begin▁of▁sentence|>User: ", | |
use_magpie_template=True, | |
) | |
pipeline = InstructionResponsePipeline(llm=llm, batch_size=5, num_rows=10) | |
if __name__ == "__main__": | |
dataset = pipeline.run() | |
dataset.push_to_hub("davidberenstein1957/sft-dataset") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment