Forked from davidberenstein1957/synthetic_data_deepseekr1_qwen_distill.py
Created
January 28, 2025 01:15
-
-
Save sikang99/96f8f4640703a95965e42a87ca35244e 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
https://www.linkedin.com/posts/davidberenstein_lets-go-generate-a-synthetic-sft-dataset-activity-7289670053682192386-Rhkt