This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Information Retrieval metrics | |
| Useful Resources: | |
| http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt | |
| http://www.nii.ac.jp/TechReports/05-014E.pdf | |
| http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf | |
| http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf | |
| Learning to Rank for Information Retrieval (Tie-Yan Liu) | |
| """ | |
| import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ Caluculates symmetric Kullback-Leibler divergence. | |
| @author Shingo OKAWA | |
| """ | |
| import numpy | |
| import sys | |
| import scipy.stats as stats | |
| import matplotlib.pyplot as plotter | |
| from gensim import corpora, models, similarities, matutils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| (function() { | |
| var w = window; | |
| var mcs = w.MyraConciergeSettings; | |
| var d = document; | |
| function l() { | |
| var s = d.createElement('script'); | |
| s.type = 'text/javascript'; | |
| s.async = true; | |
| s.src = '//cdn-prod.myralabs.com/widget/v3/widget.CUSTOMER_ID.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| viksit@gpu3-4-k80:~$ cat startx.sh | |
| screen -AdmS viksit -t tab0 bash | |
| screen -S viksit -X screen -t jup0 bash /home/viksit/j.sh | |
| screen -S viksit -X screen -t tsb0 bash /home/viksit/t.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"/> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"/> | |
| <meta name="description" content=""/> | |
| <meta name="author" content=""/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Code for the blog post | |
| # Optimizing Tool Selection for LLM Workflows: Differentiable Programming with PyTorch and DSPy | |
| # How local, learnable routers can reduce token overhead, lower costs, and bring structure back to agentic workflows. | |
| # https://viksit.substack.com/p/optimizing-tool-selection-for-llm | |
| # Ping @viksit on X with feedback/questions | |
| # ---------------------------------------------------- | |
| import torch, torch.nn as nn, torch.nn.functional as F |
OlderNewer