Available for internships & early-career roles
Gurugram, India · B.Tech CS ’27

I build systemsthat learn fromdata — then ship them.

I'm Krishna Sharma, a Computer Science student and ML practitioner. I turn raw datasets into useful models and working products — from CNNs on MNIST to production APIs.

ML + software engineering React · FastAPI · Docker Open to internships
gradientfield
Neural networks
The gradient beneath confidence

Softmax
backward

A compact implementation of the derivative that turns a classifier's confident mistake into a useful learning signal.

∂L / ∂zᵢ = softmax(z)ᵢ − yᵢ
cross-entropy loss · logits z · target y
softmax_backward.py
import numpy as npdefsoftmax(logits): shifted = logits - logits.max(axis=-1, keepdims=True) exp = np.exp(shifted) # numerical stabilityreturn exp / exp.sum(axis=-1, keepdims=True)defsoftmax_cross_entropy_backward(logits, target): probs = softmax(logits) grad = probs.copy() grad[np.arange(len(target)), target] -=1.0return grad / len(target) # dL / d(logits)logits = np.array([[2.4, 0.8, -0.2]])gradient = softmax_cross_entropy_backward(logits, [0])
01

Shift before exponentiating

Subtract the maximum logit to stay stable when confidence gets extreme.

02

Probability minus truth

The elegant derivative: predicted distribution, adjusted at the target index.

03

One signal per logit

Positive gradients lower excess confidence; the negative target gradient raises it.

built for learning in motion
krishna@portfolio:~/ml — train_transformer.py
live codingPyTorch · cuda
typing … loss 0.084 · acc 96.2%
Fancy maths — the real engine

Mathematics is the model.

Six bite-size derivations I actually use — from dot-product attention to the ELBO. Hover for intuition, drag sliders to see numbers move, and watch the gradients flow.

★ featured derivationScaled dot-product attention
$$\mathrm{Attention}(Q,K,V)=\mathrm{softmax}\!\left(\frac{QK^\top}{\sqrt{d_k}}\right)V$$
Q,K ∈ ℝ^{n×dₖ} · divide by √dₖ to keep variance ≈1 · softmax row-wise → weights sum to 1 · dₖ=64 → scale 1/8
dₖ√64=8
01

Attention weights

$$\alpha_{ij}=\frac{\exp(q_i^\top k_j/\sqrt{d_k})}{\sum_{t}\exp(q_i^\top k_t/\sqrt{d_k})}$$

Each query attends to all keys. Temperature √dₖ prevents vanishing gradients when dₖ is large.

sharpness0.62
02

Convolution

$$(f * g)[i,j]=\sum_{m}\sum_{n} f[m,n]\;g[i-m,j-n]$$

The backbone of your MNIST CNN — shared weights slide across the image.

kernel 3×3×1.0
03

Backpropagation

$$\frac{\partial \mathcal{L}}{\partial W}=\frac{\partial \mathcal{L}}{\partial \hat y}\cdot\frac{\partial \hat y}{\partial z}\cdot\frac{\partial z}{\partial W}$$

Chain rule all the way down — one scalar loss, millions of gradients.

chain depth3 layers
04

Gradient descent → Adam

$$\begin{aligned} m_t&=\beta_1 m_{t-1}+(1-\beta_1)g_t\\ v_t&=\beta_2 v_{t-1}+(1-\beta_2)g_t^2\\ \theta_{t+1}&=\theta_t-\eta\frac{m_t}{\sqrt{v_t}+\epsilon}\end{aligned}$$

Vanilla SGD oscillates. Adam adapts per-parameter with momentum + RMS.

η0.042
05

Bayes + ELBO

$$\log p(x) \ge \underbrace{\mathbb{E}_q[\log p(x|z)]}_{\text{reconstruction}}-\underbrace{\mathrm{KL}(q(z|x)\|p(z))}_{\text{regulariser}}$$

Variational inference — trade-off behind VAEs and diffusion.

β (KL weight)β=0.35
06

Regularisation

$$\mathcal{L}=\mathcal{L}_{\text{data}}+\lambda\|W\|_2^2+\text{Dropout}(p)$$

Bias–variance trade-off: $\; \mathbb{E}[(y-\hat f)^2]=\text{Bias}^2+\text{Var}+\sigma^2$

λλ=0.028
transformer_block.py — one block, all the mathsLayerNorm · MHA · FFN · residual
# x: [B, T, d]  — residual stream
def transformer_block(x):
    y = LayerNorm(x)                          #  y = (x-μ)/σ · γ + β
    a = MultiHeadAttention(y, y, y)             #  8 heads · QKᵀ/√d
    x = x + Dropout(a)                          #  residual
    y = LayerNorm(x)
    f = FFN(y)  #  W₂·GELU(W₁y + b₁) + b₂
    return x + Dropout(f)

# GELU: 0.5x(1+erf(x/√2))  ≈  x·sigmoid(1.702x)
# FFN expands 4×: d → 4d → d  (≈ 2/3 params)
Step 1 — normalise
$$\hat x = \frac{x-\mu}{\sqrt{\sigma^2+\epsilon}}\odot\gamma+\beta$$
Step 2 — attend (per head)
$$\text{head}_h=\mathrm{softmax}\!\left(\frac{Q_hK_h^\top}{\sqrt{d_h}}\right)V_h$$
Step 3 — feed-forward
$$\mathrm{FFN}(y)=W_2\,\mathrm{GELU}(W_1y+b_1)+b_2$$
Step 4 — why residuals work
$$\frac{\partial\mathcal{L}}{\partial x}=\frac{\partial\mathcal{L}}{\partial (x+f(x))}\!\left(1+\frac{\partial f}{\partial x}\right)$$
01.5 — PDE × ML

Physics-informed learning

interactive · PINNs · live solver
interactive labHEAT · WAVE · LAPLACE → PINN residual
$$u_t = \alpha\,u_{xx},\quad x\in[0,1],\;u(0,t)=u(1,t)=0$$
parabolic · smoothing · PINN residual r = ut − α uxx
● live finite-difference
x — t heatmap · u(x,t)
slice at t = 0.30 · drag time →
0.10α diffusivity
0.30t / T
0.0041mean |r|

Simulation heat

α0.10
time0.30
init
show residual BC: u=0 · IC: sin(πx)

PINN loss — 𝓛 = λf𝓛PDE + λb𝓛BC + λi𝓛IC 0.0184

𝓛PDE
0.012
𝓛BC
0.003
𝓛IC
0.005
λf1.0
λb1.0
λi1.0
tip: drag time or hit play — residual updates via autograd (finite-difference).
Why this matters for ML
Heat equation is the prototype parabolic PDE. A PINN learns uθ(x,t) without a mesh by minimising the residual rθ=ut−αuxx at collocation points — same idea as your MNIST CNN learns without hand-coded features.
built with vanilla JS · finite-difference + analytic · KaTeX for equationsopen maths · projects
01 — About

About me

Gurugram · B.Tech CS · 2027

I'm a fourth-year B.Tech Computer Science student graduating in 2027. My work sits between applied machine learning and software engineering: I like models that get deployed, not notebooks that get closed.

As a Software Development Intern at WritED Edutech, I built a React frontend and improved technical SEO for a JavaScript-rendered single-page app. Competitive programming keeps my foundations in algorithms, graphs, and dynamic programming sharp.

Right now I'm deepening ML theory while building small, complete, end-to-end projects — each one shippable, each one documented.

Education
B.Tech CS · Expected 2027
Current role
SDE Intern · WritED Edutech
Focus
Applied ML · DL · backend systems
Based in
Gurugram, Haryana, India
LeetCode
ks76479 ↗
Codeforces
ks76479 ↗
Stack
Python · C++ · React · FastAPI
02 — Projects

Selected work

2025—2026
four projects
01

Handwritten Digit Classifier

A convolutional neural network trained on MNIST, built from data loading to an inference pipeline with synthetic test cases and a structured README.

PythonTensorFlow / KerasNumPyKaggle
CNNmodel
MNISTdata
View on Kaggle ↗
02

Sentiment Analysis System

A reusable text-classification module using TF-IDF and scikit-learn to predict sentiment polarity, packaged with executed results instead of placeholder output.

Pythonscikit-learnPandasNLP
TF-IDFfeatures
sklearnmodel
View on Kaggle ↗
03

URL Shortener API

A production-style backend service for shortening and redirecting URLs, built with FastAPI and PostgreSQL and containerized with Docker.

FastAPIPostgreSQLDockerREST API
04

writed.in — Frontend & SEO

Built WritED Edutech's production React frontend, then audited technical SEO for a hash-routed SPA to improve crawlability and search visibility.

ReactTechnical SEOSPA architecture
Reactfrontend
Visit site ↗
03 — Toolkit

Toolkit

what I work with daily

Machine learning

  • Neural networks & backprop core
  • CNNs / image classification applied
  • TF-IDF / classical NLP applied
  • TensorFlow & scikit-learn tools

Software engineering

  • Python daily
  • C++ daily
  • React.js applied
  • FastAPI, PostgreSQL, Docker applied

Algorithms & math

  • DP, graphs, trees competitive
  • Number theory competitive
  • Calculus & optimization applied
  • LeetCode & Codeforcesongoing
04 — Experience

Experience

2025 — Present · Gurugram / Remote

WritED Edutech Private Limited

Software Development Intern
  • Built the writed.in frontend from scratch in React.js — from design to production deploy.
  • Led technical SEO auditing and optimization for a JavaScript-rendered SPA (hash routing → crawlable, indexable).
  • Designed a daily content pipeline for RBI Grade B exam-prep material.
2023 — Present · Self-directed

Independent Study & Competitive Programming

Self-directed · Kaggle · Codeforces
  • Regularly solve problems across DP, graph theory, and number theory.
  • Built and published end-to-end ML projects on Kaggle with clean, reproducible notebooks.
05 — Graph Theory

Graph theory — formulas I use

competitive programming
DP · BFS/DFS · shortest paths

From Codeforces rounds to interview graphs — the handful of identities and bounds that keep showing up. No fluff, just the ones that solve problems.

01 — Handshaking
$\sum_{v \in V} \deg(v) = 2|E|$
Corollary: $\#\{v:\deg(v)\text{ odd}\}$ even. Directed: $\sum \text{indeg}=\sum \text{outdeg}=|E|$.
undirected · simple or multi-graph
02 — Complete & bounds
$|E(K_n)| = \frac{n(n-1)}{2}$
Any simple: $0 \le |E| \le \frac{n(n-1)}{2}$. Turán/Mantel: triangle-free $\Rightarrow |E| \le \lfloor n^2/4 \rfloor$.
extremal · max edges
03 — Trees
$|E| = |V|-1$  ·  $\sum \deg = 2(|V|-1)$
Connected $\Leftrightarrow$ tree. Cayley: $n^{n-2}$ labelled trees. Forest: $|E|=|V|-c$.
acyclic · connected
04 — Euler & planar
$|V|-|E|+|F|=2$
Planar connected: $|E| \le 3|V|-6$ $(|V|\ge 3)$, triangle-free $|E| \le 2|V|-4$. Eulerian $\Leftrightarrow$ all $\deg$ even & connected.
planar · Eulerian trails
05 — Shortest paths
$\text{dist}[v] = \min(\text{dist}[v], \text{dist}[u]+w(u,v))$
Dijkstra $O((V+E)\log V)$ $w\ge0$. Bellman–Ford $O(VE)$. Floyd–Warshall $O(V^3)$: $\text{dist}_k[i][j]=\min(\text{dist}_{k-1}[i][j], \text{dist}_{k-1}[i][k]+\text{dist}_{k-1}[k][j])$.
w = edge weight
06 — MST & counting
Cut property $\cdot$ $w(T)=\min$ · Kirchhoff: $\tau(G)=\det(L^*)$
Kruskal/Prim $O(E\log V)$. Walks: $(A^k)_{ij}=\#\text{walks}_k$. Chromatic: $\chi \le \Delta+1$ (Brooks: $\chi \le \Delta$ except cliques/odd cycles).
A = adjacency · L = Laplacian
BFS / DFS O(V+E)Topo sort — DAG onlySCC — Kosaraju / TarjanMax-flow min-cut
05 — Resume

Resume

inline preview · PDF · 1 page
Krishna-Sharma-Resume.pdf
PDF
Preview resume
Click to load — saves ~300KB until you need it
▶ Load preview

Preview loads on click — saves bandwidth. open in new tab or download.

Copied email to clipboard