Skip to content

Instantly share code, notes, and snippets.

@madroidmaq
madroidmaq / Qwen3 embedding
Created June 23, 2025 05:56 — forked from mzbac/Qwen3 embedding
Qwen3 embedding
import mlx.core as mx
import mlx.nn as nn
from typing import Tuple, Type, Optional, List, Any
import importlib
from transformers import AutoTokenizer
from mlx_lm.utils import load_model, get_model_path
def get_qwen3_embedding_classes(config: dict) -> Tuple[Type[nn.Module], Type]:
@madroidmaq
madroidmaq / projectDependencyGraph.gradle
Created March 12, 2023 08:09
Create a dependency diagram for the current project using the syntax of plantUML, with a result that looks like the following.
task projectDependencyGraph {
doLast {
def plantuml = new File(rootProject.buildDir, 'reports/dependency-graph/project.puml')
plantuml.parentFile.mkdirs()
plantuml.delete()
plantuml << '@startuml\n'
plantuml << "!define blue #00E489\n"
plantuml << "!define origin #FF8A65\n"
plantuml << "!define green #1A73E8\n"
@madroidmaq
madroidmaq / Config.kt
Created April 1, 2019 08:41 — forked from jmfayard/Config.kt
Gists Gradle-Kotlin-DSL
// buildSrc/src/main/kotlin/Config.kt
object Config {
const val ACTIVITY = "com.mautinoa.cardapp.MainActivity"
const val PACKAGE = "com.mautinoa.cardapp"
const val kotlinVersion = "1.2.71"
object SdkVersions {
val versionCode = 1
val compile = 28
val target = 26