{"id":24082904,"url":"https://github.com/parthapray/llm_evaluation_metrics_localized","last_synced_at":"2026-04-18T13:31:26.306Z","repository":{"id":271098689,"uuid":"912396937","full_name":"ParthaPRay/llm_evaluation_metrics_localized","owner":"ParthaPRay","description":"This repo contains code for localized LLM evaluation metrics vis a framework using Ollama and edge resource and novel derived metrics","archived":false,"fork":false,"pushed_at":"2025-01-11T07:27:25.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T01:16:26.532Z","etag":null,"topics":["evaluation","evaluation-framework","evaluation-metrics","evaluations","flask","large-language-models","metrics","ollama-api","restful-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ParthaPRay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-05T13:16:06.000Z","updated_at":"2025-01-11T07:27:28.000Z","dependencies_parsed_at":"2025-01-09T23:54:47.026Z","dependency_job_id":null,"html_url":"https://github.com/ParthaPRay/llm_evaluation_metrics_localized","commit_stats":null,"previous_names":["parthapray/llm_metrics_local","parthapray/llm_evaluation_metrics_localized"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthaPRay%2Fllm_evaluation_metrics_localized","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthaPRay%2Fllm_evaluation_metrics_localized/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthaPRay%2Fllm_evaluation_metrics_localized/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthaPRay%2Fllm_evaluation_metrics_localized/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ParthaPRay","download_url":"https://codeload.github.com/ParthaPRay/llm_evaluation_metrics_localized/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240959126,"owners_count":19884911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["evaluation","evaluation-framework","evaluation-metrics","evaluations","flask","large-language-models","metrics","ollama-api","restful-api"],"created_at":"2025-01-09T23:54:51.279Z","updated_at":"2026-04-18T13:31:26.299Z","avatar_url":"https://github.com/ParthaPRay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLM Evaluation Metrics at Edge\n\nThis project provides a Flask-based API for evaluating and monitoring the performance of Large Language Models (LLMs) with detailed metrics including resource usage (CPU, memory, power), and operational efficiency.\n\n---\n## Modify base_power and max_power of your device\n\n* base_power = The Value e.g., 240 ; for IDLE Mode\n* max_power = The Value e.g. 600 ; for FULL MODE\n---\n\n## Installation\n\n### Step 1: Install Ollama\nEnsure that you have **Ollama** installed on your system. Refer to [Ollama's official installation guide](https://ollama.com) for instructions.\n\n### Step 2: Set Up Python Environment\n1. Clone this repository:\n   ```bash\n   git clone \u003crepository_url\u003e\n   cd \u003crepository_name\u003e\n   ```\n\n2. Install required dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n### Requirements\nEnsure the following Python libraries are installed:\n- `flask`\n- `psutil`\n- `requests`\n- `uvicorn`\n- `asgiref`\n\nThese are already listed in the `requirements.txt` file.\n\n## Running the Application\n\nllm_metrics_11.py has CSV and JSON logging\n\n1. Start the Flask server:\n   ```bash\n   python llm_metrics_11.py\n   ```\n\n2. The server will start and listen on `http://0.0.0.0:5000`.\n\n## API Usage\n\n### POST `/process_prompt`\nSend a prompt to the model and receive performance metrics.\n\n#### Example `curl` Command\n```bash\ncurl -X POST http://localhost:5000/process_prompt \\\n-H \"Content-Type: application/json\" \\\n-d '{\n    \"prompt\": \"What is the capital of France?\"\n}'\n```\n#### Example `batch curl` Code\n```python\npython test.py\n```\n\n#### Response\nThe API will return a JSON object containing:\n- **Ollama-based metrics**: Total duration, load duration, evaluation duration, etc.\n- **Local resource usage**: CPU usage, memory usage, power consumption.\n- **Derived metrics**: Tokens per second, energy per token, and more.\n\n---\n\nFeel free to customize the content for your specific repository and use case!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparthapray%2Fllm_evaluation_metrics_localized","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparthapray%2Fllm_evaluation_metrics_localized","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparthapray%2Fllm_evaluation_metrics_localized/lists"}