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
""" | |
RoPE triton kernel | |
""" | |
import triton | |
import triton.language as tl | |
@triton.jit | |
def _rope_kernel( | |
x_ptr, x_row_stride, x_head_stride, |
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
import os | |
import google.generativeai as genai | |
genai.configure(api_key=os.environ["GOOGLE_API_KEY"]) | |
# Create the model | |
generation_config = { | |
"temperature": 0.0, | |
"max_output_tokens": 8192, | |
"response_mime_type": "text/plain", |
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
""" | |
This script fetches download statistics for major LLM provider packages (OpenAI, Anthropic, Claude) from PyPI Stats API | |
and generates an HTML visualization showing the relative market share across different operating systems. | |
The visualization consists of three pie charts displaying the percentage of downloads for each package on: | |
- Windows | |
- MacOS (Darwin) | |
- Linux | |
Each chart shows: |
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
import math | |
import torch | |
from torch.optim import AdamW | |
class MemoryEfficientAdamW(AdamW): | |
""" | |
Memory Efficient AdamW optimizer that keeps parameters and gradients on GPU | |
but optimizer states on CPU when enabled. |
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
import json | |
from dataclasses import dataclass | |
from pathlib import Path | |
from typing import Optional, Tuple, Union | |
import torch | |
import torch.nn.functional as F | |
from torch import nn | |
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" class="scroll-smooth"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Paraxanthine Versus Caffeine: An Evidence-Based Evaluation</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<link rel="preconnect" href="https://fonts.googleapis.com"> | |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | |
<link href="https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,[email protected],400;8..60,600;8..60,700&family=Inter:wght@400;500;600&display=swap" rel="stylesheet"> |
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
Caffeine, a methylxanthine alkaloid, stands as the most widely consumed psychoactive substance on the planet. Its presence is woven into the daily rituals of billions, found in coffee, tea, chocolate, and an ever-expanding universe of energy drinks, sodas, and dietary supplements. Consumers turn to it for its well-documented ability to promote wakefulness, enhance cognition, and boost physical performance. For many, it is an indispensable tool for navigating the demands of modern life. Yet, for a significant portion of these users, the benefits of caffeine come with a familiar list of drawbacks: anxiety, jitters, digestive upset, and disrupted sleep. | |
Into this landscape has emerged paraxanthine, a compound fascinating yet unfamiliar to most people. Scientifically known as 1,7-dimethylxanthine, paraxanthine is not an obscure molecule from a remote plant but is, in fact, the principal metabolite produced by the human body after caffeine is consumed. When an individual drinks a cup of coffee, their liver rapidly |
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 name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>AI Chess Arena - Gemini API Chess Battle</title> | |
<style> | |
body { | |
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
margin: 0 auto; |
OlderNewer