Posts

Showing posts with the label gemma 2b

SQL Queries Code Interviews QA 50 plus

Image
Here are SQL-focused interview questions with only the relevant SQL code: 1. Find the second highest salary from an Employee table. SELECT MAX(Salary) AS SecondHighestSalary FROM Employees WHERE Salary < (SELECT MAX(Salary) FROM Employees); Using ROW_NUMBER(): WITH RankedSalaries AS (   SELECT Salary, ROW_NUMBER() OVER (ORDER BY Salary DESC) AS Rank   FROM Employees ) SELECT Salary AS SecondHighestSalary FROM RankedSalaries WHERE Rank = 2; --- 2. Write a query to calculate a running total of sales. SELECT   OrderID,   OrderDate,   Amount,   SUM(Amount) OVER (ORDER BY OrderDate) AS RunningTotal FROM Orders; --- 3. Retrieve customers who placed no orders using a LEFT JOIN. SELECT c.CustomerID, c.CustomerName FROM Customers c LEFT JOIN Orders o ON c.CustomerID = o.CustomerID WHERE o.OrderID IS NULL; --- 4. Write a query to find the top 3 highest salaries. SELECT DISTINCT Salary FROM Employees ORDER BY Salary DESC LIMIT 3; Using DENSE_RANK(): WIT...

Gemma 2B Fine Tuned Lightweight model

 Kaggle Notebook Gemma 2B Fine Tuned Lightweight model Step 1: Configure GPU for Memory Growth python gpus = tf.config.list_physical_devices( 'GPU' ) if gpus: try : for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True ) print ( "GPU memory growth enabled." ) except RuntimeError as e: print (e) else : print ( "No GPU found. Using CPU." ) Purpose : Ensures the GPU is set to dynamically allocate memory instead of pre-allocating all available GPU memory. This approach prevents memory wastage and allows multiple processes to use the GPU without running into memory allocation errors. Technical Details : tf.config.list_physical_devices('GPU') : Lists available GPUs. tf.config.experimental.set_memory_growth(gpu, True) : Allows TensorFlow to allocate GPU memory on demand. Fallback : If no GPU is found, the code defaults to CPU computation. Step 2: Enable Mixed Precision for Memory Optimizatio...

Space Research - Chain of thoughts, Tree of thought Framework for Research Papers and Practical innovative solution

Image
  Source Code  Kaggle Notebook:  Space Research COT TOT Prompt - Gemma 2B Responses Google Colab:  space-research-cot-tot-prompt-gemma-2b-responses (1).ipynb - Colab   Leveraging Chain of Thoughts (CoT) and Tree of Thoughts (ToT) Models for Space Research and Innovation Subject Details: Introduction to CoT and ToT Methodologies : Overview of Chain of Thoughts (CoT) as a step-by-step reasoning framework. Introduction to Tree of Thoughts (ToT) for multi-branch explorations, allowing parallel evaluation of diverse hypotheses. Applications in Research Paper Development : Enhancing clarity and logical structuring in academic papers. Automating the drafting of hypotheses, problem-solving approaches, and iterative revisions. Innovation in Space Research : Hypothesis generation for challenges like propulsion systems or asteroid mining. Multi-path exploration to cover cost, feasibility, and ethical dimensions of research. Data-driven insights to predict space weather or ...