model_validation / README.md
disi98's picture
Update README.md
1f68bf1 verified
metadata
title: Model Validation
emoji: 🏢
colorFrom: pink
colorTo: purple
sdk: gradio
sdk_version: 4.31.0
app_file: app.py
pinned: false

Documentation

Group1_Subtask2

Generating A Judger Response For Target Model

Model Functionalities

  • Model Prompt
  • Two responses from the model based on the prompt
  • Judger Model takes the two responses as prompts and gives back a judgment
  • User modifies the judgment to fit his/her views

Target Model - Gemini
Featured Judger Model - Gemini

Functions

-> model_prompt_response function: takes prompt from the user as an argument and parse to the model. Returns:
  • response1_model: Response 1 from the target model
  • judge_1: Judgement 1 from the judger for response 1
  • score1_judger: Score 1 from the judger for response 1
  • response1_mode2: Response 2 from the target model
  • judge_2: Judgement 2 from the judger for response 2
  • score1_judger: Score 2 from the judger for response 2

-> judge_response function: Takes score1_judger, score2_judger, judge_1 and judge_2 from model_prompt_response as arguments. Returns:

  • response1_judger: Edited/Accepted Response 1 by user
  • score1_anonator: Edited/Accepted Score 1 by user
  • response2_judger: Edited/Accepted Response 2 by user
  • score2_anonator: Edited/Accepted Score 2 by user

-> assign_score function. Implements a simple search algorithm that searches judge_1 and judge_2 for score and assigns a score to the responses from the target model.

Model Demo

Dependencies

File -> requirements.txt
gradio for gradio
google.generativeai for Gemini generative AI
--------------------------------------------------------
Configs:
api_key api key
model model instance

Team


Collins Okoth: collins.okech@digitaldividedata.com
Albert Disi: albert.disi@digitaldividedata.com
Joseph Amadi: joseph.amadi@digitaldividedata.com


Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference