_index.org

MLE for Conditional Gaussian

Last edited: August 8, 2025

Let’s say we want to find MLE parameters \(\theta\) for a conditional Gaussian with constant variance. That is:

\begin{equation} p\qty(y_{i} | x_{i}) = \mathcal{N} \qty(y_{i}|f_{\theta } \qty(x_{i}), \sigma^{2}) \end{equation}

and we have a corresponding dataset: \(\qty(x_1, y_1), …, \qty(x_{m}, y_{m})\).

where:

\begin{align} \hat{\theta} &= \arg\max_{\theta} \sum_{i=1}^{m} \log p\qty(y_{i}|x_{i}) \\ &= \arg\max_{\theta} \sum_{i=1}^{m} \log \mathcal{N} \qty(y_{i}| f_{\theta} \qty(x_{i}), \sigma^{2}) \\ &= \arg\max_{\theta } \sum_{i=1}^{m} \log \frac{1}{\sqrt{{2 \pi \sigma^{2}}}} \exp \qty(- \frac{\qty(y_{i}- f_{\theta }\qty(x_{i}))^{2}}{2\sigma^{2}}) \end{align}

MLib

Last edited: August 8, 2025

MLib is a machine learning library built on top of Spark.

from pyspalk.mllib.clustering import KMeans

KMeans(rdd)

where you pass the MLib a PySpark RDD

MLK and Malcom X Reading

Last edited: August 8, 2025

Reading notes

Malcom X’s father was an active prechear in the scene

Malcom X and MLK are both made mostly charactures out of context

Malcom X had a belligent upbringing with a belligent father, whereas MLK lived in relative comfort as a son of a successful minister

Malcom was sent into white foster families as his mother became institutionalized

Becasue of his experience in foster system, Malcom tried to pass/be white

King’s nonviolent priciples not understood and became conflicted with ideas of local leaders

Malcom found a father figure in the Nation of Islam, changing his name in prison

MLK had more positive African American role models in life

Malcom X disallusioned with the policy of nonengagement by the nation of islam

Malcom X had support over racial seperatism

Nation of Islam wanted to create a completely seperate Black state, promoting Black Nationalism secret

Malcom X wanted break because of skeptism again Eli Mohammed

Malcom charged MLK with infiltration

Martin believes that the process of voilence is a form of naïve expression

King believes that the “strong demagogic oratory” of Malcom was detrimental and extremist

Martin believes that the personal nature of assults from Malcom maybe result in physical assult

Malcom was suspended during 1963, and became independent—wanted to combine religion and politics like King

Malcom began forging ties with millitan Black movement

Martin regretted that integration has not proceeded, but believed it would have been difficult anyways

Rejected nonviolent and intergrational movement

People saw King and X’s ideas inrecosiliable

But, King and X themselves made a possible shared ending by the end

Believes that suicides were cut short

Racial pride was a centering point: while Malcom saw it as something to be harbored, Martin saw it as inate

Modal

Last edited: August 8, 2025

Modal is a cloud deployment system that’s entirely programmatic. No yaml:

import modal

stub = modal.stub(gpu="a100")
@stub.function()
def fit(x):
    import whatever
    whatever.thing()

So think run.house, but they have the infra.

fine-tuning with Modal

https://github.com/modal-labs/llama-recipes

You can store the serverless functions, and Modal can serve stored serverless functions. Modal have web hooks as well to do inference at a front end.

Modal can serve most the management as well.

pricing

13B: 500 tokens/s on 40GB AA10 (3.73 / hour) 70B: 300 tok /s 80 GB( 2* 5.59/hour)