umar igan

umarigan

AI & ML interests

Generative AI

Recent Activity

updated a dataset about 8 hours ago
umarigan/deepseek-r1-reasoning-prompts
posted an update about 8 hours ago
** Extracting Reasoning Prompts with DeepSeek-R1: A Step Towards Better AI Reasoning ** Hi everyone! 👋 I’m excited to share a small but impactful project I’ve been working on, where I extracted **reasoning prompts** using the **DeepSeek-R1 model**. Reasoning prompts are a powerful way to understand how AI models arrive at their answers, and they can be used to train smaller, more efficient models to generate reasoning. Let me walk you through the process and explain why this is important. --- #### **The Code: Extracting Reasoning Prompts** Here’s the code I used to extract reasoning prompts from the `openaccess-ai-collective/oo-gpt4-filtered` dataset: ```python from tqdm import tqdm import time reasoning_data = [] for example in tqdm(ds, desc="answering"): try: response = client.chat.completions.create( model='deepseek-reasoner', # Using DeepSeek-R1 for reasoning messages=[ {"role": "system", "content": example['system_prompt']}, {"role": "user", "content": example['question']}, ], stream=False, max_tokens=4096, temperature=0.7, ) answer = response.choices[0].message.content reasoning = response.choices[0].message.reasoning_content reasonng_example = { "id": example['id'], "question": example['question'], 'answer': answer, 'reasoning': reasoning, } reasoning_data.append(reasonng_example) except Exception as e: print(f"Error translating example: {e}") time.sleep(3) # Wait for 3 seconds before continuing continue # Skip the current example and move to the next one ``` data: https://huggingface.co./datasets/umarigan/deepseek-r1-reasoning-prompts
published a dataset about 8 hours ago
umarigan/deepseek-r1-reasoning-prompts
View all activity

Organizations

Open-Source AI Meetup's profile picture Mathematical Intelligence's profile picture Aref AI's profile picture Social Post Explorers's profile picture

umarigan's activity

posted an update about 8 hours ago
view post
Post
210
** Extracting Reasoning Prompts with DeepSeek-R1: A Step Towards Better AI Reasoning **

Hi everyone! 👋

I’m excited to share a small but impactful project I’ve been working on, where I extracted **reasoning prompts** using the **DeepSeek-R1 model**. Reasoning prompts are a powerful way to understand how AI models arrive at their answers, and they can be used to train smaller, more efficient models to generate reasoning. Let me walk you through the process and explain why this is important.

---

#### **The Code: Extracting Reasoning Prompts**

Here’s the code I used to extract reasoning prompts from the openaccess-ai-collective/oo-gpt4-filtered dataset:

from tqdm import tqdm
import time

reasoning_data = []

for example in tqdm(ds, desc="answering"):
    try:
        response = client.chat.completions.create(
            model='deepseek-reasoner',  # Using DeepSeek-R1 for reasoning
            messages=[
                {"role": "system", "content": example['system_prompt']},
                {"role": "user", "content": example['question']},
            ],
            stream=False,
            max_tokens=4096,
            temperature=0.7,
        )
        
        answer = response.choices[0].message.content
        reasoning = response.choices[0].message.reasoning_content

        reasonng_example = {
            "id": example['id'],
            "question": example['question'],
            'answer': answer,
            'reasoning': reasoning,
        }

        reasoning_data.append(reasonng_example)
    except Exception as e:
        print(f"Error translating example: {e}")
        time.sleep(3)  # Wait for 3 seconds before continuing
        continue  # Skip the current example and move to the next one

data: umarigan/deepseek-r1-reasoning-prompts