Skip to main content

Posts

Showing posts with the label prompt engineering

Fine Tuning LLM

Fine-tuning a language model for code completion tasks involves several steps, including data preprocessing, model training, and evaluation. Here’s a detailed overview of the process, specifically tailored for a hypothetical Phi3 SLM (Super Language Model):  1. Data Preprocessing Preprocessing is crucial to prepare the dataset for fine-tuning the model effectively. Here are the steps involved:  Data Collection - Source Code Repositories: Gather data from various programming languages from platforms like GitHub, GitLab, Bitbucket, etc. - Public Datasets: Use publicly available datasets like the CodeSearchNet dataset or others provided by the AI community.  Cleaning and Formatting - Remove Comments: Depending on the task, you might want to remove or keep comments. For code completion, retaining comments might help in understanding the context. - Normalize Code: Standardize code formatting, such as indentation, line breaks, and spacing. - Remove Duplicates: Ensure there are...

Prompt Engineering

How to create a proper prompt for your query is very important. You can use this tool very easily to create proper #prompts to generate much better results for your query to #llms say #chatgpt or #bardai Say as an example I am asking chatgpt "Details machine learning engineer job post to hire a machine learning engineer" see the response below. ------------------------------------------------------------------------------------------------------------------------ **Job Title: Machine Learning Engineer** **Company: [Your Company Name]** **Location: [City, State] | Employment Type: [Full-time/Contract]** **About Us:** [Your Company Name] is a leading [industry/domain] company dedicated to [brief company mission or values]. With a focus on innovation and technology, we are committed to transforming [industry/domain] through cutting-edge solutions. As we continue to grow, we are seeking a talented and motivated Machine Learning Engineer to join our dynamic team. **Responsibilitie...

Prompt Engineering & Orchestration

                              Photo by Andrea Piacquadio Prompt engineering is a buzzword, especially for Software Development. Today we are going to learn by developing a very simple application. We are going to assemble a set of prompts into a working prototype service, utilizing orchestration tools to link multiple calls to AI. Python code below import json import requests # Define the AI endpoints ai_endpoints = {     "text_generation": "https://api.openai.com/v1/engines/davinci/completions",     "image_generation": "https://api.openai.com/v1/images/generation" } # Define the orchestration tool class Orchestrator:     def __init__(self):         self.ai_endpoints = ai_endpoints     def call_ai(self, endpoint, prompt):         headers = {             "Authorization": "Bearer YOUR_API_KE...