repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
facebookresearch/Detic | https://github.com/facebookresearch/Detic | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | detic/data/datasets/register_oid.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:20.359161 | # Copyright (c) Facebook, Inc. and its affiliates.
# Modified by Xingyi Zhou from https://github.com/facebookresearch/detectron2/blob/master/detectron2/data/datasets/coco.py
import copy
import io
import logging
import contextlib
import os
import datetime
import json
import numpy as np
from PIL import Image
from fvcor... |
facebookresearch/Detic | https://github.com/facebookresearch/Detic | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | detic/data/datasets/oid.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:20.519350 | # Part of the code is from https://github.com/xingyizhou/UniDet/blob/master/projects/UniDet/unidet/data/datasets/oid.py
# Copyright (c) Facebook, Inc. and its affiliates.
from .register_oid import register_oid_instances
import os
categories = [
{'id': 1, 'name': 'Infant bed', 'freebase_id': '/m/061hd_'},
{'id'... |
facebookresearch/Detic | https://github.com/facebookresearch/Detic | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | detic/data/tar_dataset.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:20.583087 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
import os
import gzip
import numpy as np
import io
from PIL import Image
from torch.utils.data import Dataset
try:
from PIL import UnidentifiedImageError
unidentified_error_available = True
except ImportError:
# UnidentifiedImageErr... |
facebookresearch/Detic | https://github.com/facebookresearch/Detic | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | tools/get_coco_zeroshot_oriorder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:23.172155 | # Copyright (c) Facebook, Inc. and its affiliates.
import argparse
import json
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--data_path', default='datasets/coco/annotations/instances_val2017_unseen_2.json')
parser.add_argument('--cat_path', default='datasets/coco/annot... |
facebookresearch/Detic | https://github.com/facebookresearch/Detic | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | tools/get_cc_tags.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:23.201886 | # Copyright (c) Facebook, Inc. and its affiliates.
import argparse
import json
from collections import defaultdict
from detectron2.data.datasets.lvis_v1_categories import LVIS_CATEGORIES
# This mapping is extracted from the official LVIS mapping:
# https://github.com/lvis-dataset/lvis-api/blob/master/data/coco_to_syns... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:26.527584 | from .model.language_model.cambrian_llama import CambrianLlamaForCausalLM, CambrianConfig
from .model.language_model.cambrian_mistral import CambrianMistralForCausalLM, CambrianMistralConfig
|
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/cambrian_arch.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:26.531346 | # Copyright 2023 Haotian Liu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/language_model/cambrian_cohere.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:26.537365 | # Copyright 2023 Haotian Liu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/conversation.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:26.540938 | import dataclasses
from enum import auto, Enum
from typing import List, Tuple
import base64
from io import BytesIO
from PIL import Image
class SeparatorStyle(Enum):
"""Different separator style."""
SINGLE = auto()
TWO = auto()
MPT = auto()
PLAIN = auto()
LLAMA_2 = auto()
LLAMA_3 = auto()
... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/mm_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:26.544977 | from PIL import Image
from io import BytesIO
import base64
import torch
import math
import ast
from transformers import StoppingCriteria
from cambrian.constants import IMAGE_TOKEN_INDEX
from cambrian.utils import IS_XLA_AVAILABLE
def select_best_resolution(original_size, possible_resolutions):
"""
Selects th... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/constants.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:26.545955 | CONTROLLER_HEART_BEAT_EXPIRATION = 30
WORKER_HEART_BEAT_INTERVAL = 15
LOGDIR = "."
# Model Constants
IGNORE_INDEX = -100
IMAGE_TOKEN_INDEX = -200
DEFAULT_IMAGE_TOKEN = "<image>"
DEFAULT_IMAGE_PATCH_TOKEN = "<im_patch>"
DEFAULT_IM_START_TOKEN = "<im_start>"
DEFAULT_IM_END_TOKEN = "<im_end>"
IMAGE_PLACEHOLDER = "<image... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/builder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:26.547337 | # Copyright 2023 Haotian Liu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/consolidate.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:26.548647 | import os
from glob import glob
from collections import OrderedDict
from tqdm import tqdm
import torch
def _numel(shape):
numel = 1
for d in shape:
numel *= d
return numel
def _consolidate_param(state_dict_list, shard_metadata, name, prefix, suffix):
p_shard_list = []
for state_dict in... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/language_model/cambrian_gemma.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:26.571427 | # Copyright 2023 Haotian Liu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:26.608113 | from .language_model.cambrian_llama import CambrianLlamaForCausalLM, CambrianConfig
from .language_model.cambrian_mistral import CambrianMistralForCausalLM, CambrianMistralConfig
|
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/language_model/cambrian_phi3.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:27.395061 | # Copyright 2023 Haotian Liu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/language_model/cambrian_mistral.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:27.402110 | # Copyright 2023 Haotian Liu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/language_model/phi3/configuration_phi3.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:27.409149 | # coding=utf-8
# Copyright 2024 Microsoft and the HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/language_model/cambrian_llama.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:27.410216 | # Copyright 2023 Haotian Liu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/language_model/phi3/modeling_phi3.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:27.463803 | # coding=utf-8
# Copyright 2024 Microsoft and the HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/clip_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:27.942911 | import torch
import torch.nn as nn
import torch.nn.functional as F
from transformers import CLIPVisionModel, CLIPImageProcessor, CLIPVisionConfig
from open_clip import create_model_from_pretrained, get_tokenizer
from ezcolorlog import root_logger as logger
from .base_encoder import BaseVisionTower
from cambrian.utils... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/diffusion_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:27.964069 | import torch
import numpy as np
from .base_encoder import ProcessorWrapper
from .base_encoder import BaseVisionTower
from typing import Optional, Union
from torchvision import transforms
from diffusers import DDIMScheduler, StableDiffusionPipeline
from diffusers.models.unets.unet_2d_condition import UNet2DConditionM... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/eva_clip_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:27.979332 | import torch
from open_clip import create_model_from_pretrained
from timm.models.eva import Eva
from .base_encoder import ProcessorWrapper
from .clip_encoder import ClipVisionTower
class EvaClipVisionTower(ClipVisionTower):
def __init__(self, vision_tower_name, args, delay_load=False):
super(ClipVisionT... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/hybrid_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:27.985391 | import numpy as np
import torch
import torch.nn.functional as F
from torchvision.transforms.functional import to_pil_image
from ezcolorlog import root_logger as logger
from .base_encoder import BaseVisionTower
from .load import load_vision_model
def revert_preprocessing(images):
def convert_to_pil(tensor):
... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/dfn_clip_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:27.997111 | import torch
from open_clip import create_model_from_pretrained
from .base_encoder import ProcessorWrapper
from .clip_encoder import ClipVisionTower
class DfnClipVisionTower(ClipVisionTower):
def load_model(self, device_map=None):
if self.vision_tower_name == "apple/DFN5B-CLIP-ViT-H-14-378":
... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/dino_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.004594 | import torch
import torch.nn.functional as F
from ezcolorlog import root_logger as logger
from transformers import Dinov2Model, AutoImageProcessor, Dinov2Config
from .base_encoder import BaseVisionTower
def extract_res_interp(model_name):
valid_model_prefixes = [
"facebook/dinov2-small",
"faceb... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/ijepa/vision_transformer.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.048080 |
import math
from functools import partial
import numpy as np
import torch
import torch.nn as nn
def _no_grad_trunc_normal_(tensor, mean, std, a, b):
# Cut & paste from PyTorch official master until it's in a few official releases - RW
# Method based on https://people.sc.fsu.edu/~jburkardt/presentations/trun... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/builder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.171713 | import os
import copy
from ezcolorlog import root_logger as logger
from .clip_encoder import ClipVisionTower
from .dfn_clip_encoder import DfnClipVisionTower
from .siglip_encoder import SiglipVisionTower
from .eva_clip_encoder import EvaClipVisionTower
from .clip_convnext_encoder import CLIPConvNextTower
from .dino_e... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/base_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.215214 | from abc import ABC, abstractmethod
import torch
import torch.nn as nn
from transformers import CLIPVisionModel, CLIPImageProcessor, CLIPVisionConfig
from open_clip import create_model_from_pretrained, get_tokenizer
from ezcolorlog import root_logger as logger
class ProcessorWrapper:
def __init__(self, transf... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/clip_convnext_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.217082 | import torch
import torch.nn as nn
from open_clip import create_model_from_pretrained
from timm.models.convnext import ConvNeXt
import torch
from torch import nn
import torch.nn.functional as F
from cambrian.model.multimodal_encoder.base_encoder import BaseVisionTower, ProcessorWrapper
def extract_res_interp(model_na... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/load.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.507648 | from ezcolorlog import root_logger as logger
from .clip_encoder import ClipVisionTower
from .dfn_clip_encoder import DfnClipVisionTower
from .siglip_encoder import SiglipVisionTower
from .eva_clip_encoder import EvaClipVisionTower
from .clip_convnext_encoder import CLIPConvNextTower
from .dino_encoder import DinoVisio... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/ijepa_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.508345 | import os
import torch
from torchvision import transforms
from ezcolorlog import root_logger as logger
from .base_encoder import BaseVisionTower, ProcessorWrapper
from .ijepa.vision_transformer import vit_huge, vit_giant
class IJepaVisionTower(BaseVisionTower):
def __init__(self, vision_tower, args, delay_loa... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/mae_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.523244 | import torch
import timm
from ezcolorlog import root_logger as logger
from .base_encoder import BaseVisionTower, ProcessorWrapper
class MAEVisionTower(BaseVisionTower):
def __init__(self, vision_tower, args, delay_load=False):
super(MAEVisionTower, self).__init__(vision_tower, args, delay_load)
... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/maws_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.533734 | import torch
from torchvision import transforms
from .base_encoder import BaseVisionTower, ProcessorWrapper
class MawsVisionTower(BaseVisionTower):
def __init__(self, vision_tower, args, delay_load=False):
super(MawsVisionTower, self).__init__(vision_tower, args, delay_load)
# extract image res... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/moco/vision_transformer.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.574137 | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import math
import torch
import torch.nn as nn
from functools import partial, reduce
from operator import mul
from timm.mod... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/midas_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.575226 | import torch
from torchvision import transforms
import timm
from transformers import DPTImageProcessor, DPTForDepthEstimation
from .base_encoder import BaseVisionTower
class ProcessorWrapper:
def __init__(self, transform, height=378, width=378, image_mean=[0.48145466, 0.4578275, 0.40821073]):
self._crop_... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/moco_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.612864 | import os
import torch
from torchvision import transforms
from ezcolorlog import root_logger as logger
from .base_encoder import BaseVisionTower, ProcessorWrapper
from .moco.vision_transformer import vit_base
class MoCoVisionTower(BaseVisionTower):
def __init__(self, vision_tower, args, delay_load=False):
... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/oai_clip_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.718182 | import torch
import torch.nn as nn
from transformers import CLIPVisionModel, CLIPImageProcessor, CLIPVisionConfig
class CLIPVisionTower(nn.Module):
def __init__(self, vision_tower, args, delay_load=False):
super().__init__()
self.is_loaded = False
self.vision_tower_name = vision_tower
... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/pixart_alpha_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:28.755473 | import torch
import numpy as np
from .base_encoder import ProcessorWrapper
from .base_encoder import BaseVisionTower
from typing import Optional, Union
from torchvision import transforms
from diffusers import DDIMScheduler, StableDiffusionPipeline
from diffusers import PixArtAlphaPipeline, DPMSolverMultistepSchedule... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/sam/encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.080622 | # https://github.com/deepseek-ai/DeepSeek-VL/blob/main/deepseek_vl/models/sam.py
import copy
from dataclasses import dataclass
from functools import partial
from typing import List, Optional, Tuple, Type, Union
import torch
import torch.nn as nn
import torch.nn.functional as F
from ezcolorlog import root_logger as ... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/sam/common.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.098209 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import Type
import torch
import torch.nn as nn
class MLPBlock(nn.Module):
def __init__(
self,
... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/sam_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.108277 | import re
from ezcolorlog import root_logger as logger
import torch
from torch import nn
import numpy as np
from huggingface_hub import hf_hub_download
import torch.nn.functional as F
from torchvision.transforms.functional import resize, to_pil_image # type: ignore
from transformers import SamModel, SamVisionConfig,... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/sam/transforms.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.117790 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import torch
from torch.nn import functional as F
from torchvision.transforms.functional import resize,... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/siglip_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.134220 | import torch
import torch.nn.functional as F
from open_clip import create_model_from_pretrained
from .base_encoder import ProcessorWrapper
from .clip_encoder import ClipVisionTower
def extract_res_interp(model_name):
valid_model_prefixes = {
"siglip/CLIP-ViT-SO400M-14-384":"hf-hub:timm/ViT-SO400M-14-Sig... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/siglip_clip_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.158472 | import torch
import torch.nn as nn
from transformers import CLIPVisionModel, CLIPImageProcessor, CLIPVisionConfig
class CLIPVisionTower(nn.Module):
def __init__(self, vision_tower, args, delay_load=False):
super().__init__()
self.is_loaded = False
self.vision_tower_name = vision_tower
... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_encoder/supervised_vit_encoder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.161568 | import torch
import timm
from ezcolorlog import root_logger as logger
from .base_encoder import BaseVisionTower, ProcessorWrapper
class SupervisedViT_VisionTower(BaseVisionTower):
def __init__(self, vision_tower, args, delay_load=False):
super(SupervisedViT_VisionTower, self).__init__(vision_tower, args... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_projector/builder.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.263154 | import torch
import torch.nn as nn
import re
from .projectors import CAbstractor
class IdentityMap(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x, *args, **kwargs):
return x
@property
def config(self):
return {"mm_projector_type": 'identity'}
class Si... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/multimodal_projector/projectors.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.306702 | from functools import partial
import torch
import torch.nn as nn
from einops import rearrange
# from timm.layers import LayerNorm, LayerNorm2d
# from timm.models.regnet import RegStage
def build_pos_embeds(
num_input_tokens: int, vision_hidden_size: int
):
# pos emb
pos_emb = torch.nn.Parameter(torch.z... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/model/vision_sampler.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.307221 | import torch
import torch.utils.checkpoint
from torch import nn
import math
import numpy as np
# https://github.com/facebookresearch/mae/blob/efb2a8062c206524e35e47d04501ed4f544c0ae8/util/pos_embed.py#L20
def get_2d_sincos_pos_embed(embed_dim, grid_size, cls_token=False):
"""
grid_size: int of the grid height... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/serve/cli.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.662622 | import argparse
import torch
from cambrian.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN
from cambrian.conversation import conv_templates, SeparatorStyle
from cambrian.model.builder import load_pretrained_model
from cambrian.utils import disable_torch_init
from c... |
cambrian-mllm/cambrian | https://github.com/cambrian-mllm/cambrian | null | null | null | null | 1,997 | null | null | apache-2.0 | null | null | null | null | null | null | null | cambrian/serve/controller.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:29.669991 | """
A controller manages distributed workers.
It sends worker addresses to clients.
"""
import argparse
import asyncio
import dataclasses
from enum import Enum, auto
import json
import logging
import time
from typing import List, Union
import threading
from fastapi import FastAPI, Request
from fastapi.responses import... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmarks/against_scan.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:31.882711 | # This benchmark should be ran on the GPU.
import timeit
import diffrax as dfx
import jax
import jax.lax as lax
import jax.numpy as jnp
# SETUP
N = 256
N_steps = 2000
ts = jnp.linspace(0, 1, N_steps + 1)
u0, v0 = jnp.zeros((N, N)), jnp.zeros((N, N)).at[32, 32].set(1.0)
fields = (u0, v0)
du = lambda t, v, args: -(v... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:31.895806 | import importlib.metadata
from ._adjoint import (
AbstractAdjoint as AbstractAdjoint,
BacksolveAdjoint as BacksolveAdjoint,
DirectAdjoint as DirectAdjoint,
ForwardMode as ForwardMode,
ImplicitAdjoint as ImplicitAdjoint,
RecursiveCheckpointAdjoint as RecursiveCheckpointAdjoint,
)
from ._autocita... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmarks/old_pid_controller.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:31.914720 | from collections.abc import Callable
from typing import cast, TypeVar
import equinox as eqx
import equinox.internal as eqxi
import jax
import jax.lax as lax
import jax.numpy as jnp
import jax.tree_util as jtu
import lineax.internal as lxi
import optimistix as optx
from diffrax import AbstractTerm, ODETerm, RESULTS
fro... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmarks/compile_times.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:31.917503 | import functools as ft
import timeit
from typing import cast
import diffrax as dfx
import equinox as eqx
import jax
import jax.numpy as jnp
import jax.random as jr
from jaxtyping import Array
def _weight(in_, out, key):
return [[w_ij for w_ij in w_i] for w_i in jr.normal(key, (out, in_))]
class VectorField(eqx... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_autocitation.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:31.918909 | import functools as ft
import inspect
import re
from collections.abc import Callable
import jax
import jax.core
import jax.tree_util as jtu
from ._adjoint import BacksolveAdjoint, DirectAdjoint, RecursiveCheckpointAdjoint
from ._brownian import AbstractBrownianPath, VirtualBrownianTree
from ._custom_types import Brow... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmarks/jump_step_timing.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:31.922117 | from warnings import simplefilter
simplefilter(action="ignore", category=FutureWarning)
import timeit
from functools import partial
import diffrax
import equinox as eqx
import jax
import jax.numpy as jnp
import jax.random as jr
from old_pid_controller import OldPIDController
t0 = 0
t1 = 5
dt0 = 0.5
y0 = 1.0
drift... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmarks/lotka_volterra.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:31.928194 | # Based on https://benchmarks.sciml.ai/html/MultiLanguage/wrapper_packages.html
import timeit
import jax
import jax.numpy as jnp
from diffrax import diffeqsolve, Dopri8, ODETerm, PIDController, Tsit5
jax.config.update("jax_enable_x64", True)
def vector_field(t, y, args):
a = 1.5
b = -1
c = -3
d = ... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmarks/small_neural_ode.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:31.936424 | """Benchmarks Diffrax vs torchdiffeq vs jax.experimental.ode.odeint"""
import gc
import time
from typing import cast
import diffrax
import equinox as eqx
import jax
import jax.experimental.ode as experimental
import jax.nn as jnn
import jax.numpy as jnp
import jax.random as jr
import numpy as np
import torch # pyrig... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_adjoint.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:31.942737 | import abc
import functools as ft
import warnings
from collections.abc import Callable, Iterable
from typing import Any, cast
import equinox as eqx
import equinox.internal as eqxi
import jax
import jax.lax as lax
import jax.numpy as jnp
import jax.tree_util as jtu
import lineax as lx
import optimistix.internal as optx... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmarks/brownian_tree_times.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:31.988120 | """
v0.5.0 introduced a new implementation for `diffrax.VirtualBrownianTree` that is
additionally capable of computing Lévy area.
Here we check the speed of the new implementation against the old implementation, to be
sure that it is still fast.
"""
import timeit
from typing import cast, TypeAlias
import diffrax
imp... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_brownian/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:32.482082 | from .base import AbstractBrownianPath as AbstractBrownianPath
from .path import UnsafeBrownianPath as UnsafeBrownianPath
from .tree import VirtualBrownianTree as VirtualBrownianTree
|
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_brownian/path.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:32.498221 | import math
from typing import cast
import equinox as eqx
import equinox.internal as eqxi
import jax
import jax.numpy as jnp
import jax.random as jr
import jax.tree_util as jtu
import lineax.internal as lxi
from jaxtyping import Array, PRNGKeyArray, PyTree
from lineax.internal import complex_to_real_dtype
from .._cus... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_brownian/base.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:32.504805 | import abc
from typing import TypeVar
from equinox.internal import AbstractVar
from jaxtyping import Array, PyTree
from .._custom_types import (
AbstractBrownianIncrement,
BrownianIncrement,
RealScalarLike,
SpaceTimeLevyArea,
)
from .._path import AbstractPath
_Control = TypeVar("_Control", bound=Py... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_heuristics.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:32.537402 | import jax.tree_util as jtu
from jaxtyping import PyTree
from ._brownian import AbstractBrownianPath, UnsafeBrownianPath
from ._path import AbstractPath
from ._term import AbstractTerm
# Assumes that the SDE-ness is interpretable by finding AbstractBrownianPath.
# In principle a user could re-create terms, controls,... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_brownian/tree.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:32.551091 | import math
from typing import Literal, TypeAlias, TypeVar
import equinox as eqx
import equinox.internal as eqxi
import jax
import jax.lax as lax
import jax.numpy as jnp
import jax.random as jr
import jax.tree_util as jtu
import lineax.internal as lxi
from jaxtyping import Array, Inexact, PRNGKeyArray, PyTree
from lin... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_global_interpolation.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:32.553039 | import functools as ft
from collections.abc import Callable
from typing import cast, TYPE_CHECKING
import equinox as eqx
import equinox.internal as eqxi
import jax
import jax.lax as lax
import jax.numpy as jnp
import jax.tree_util as jtu
if TYPE_CHECKING:
from typing import ClassVar as AbstractVar
else:
from... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_event.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:32.557865 | import abc
from collections.abc import Callable
import equinox as eqx
import jax.tree_util as jtu
import optimistix as optx
from jaxtyping import Array, PyTree
from ._custom_types import BoolScalarLike, FloatScalarLike, RealScalarLike
from ._step_size_controller import AbstractAdaptiveStepSizeController
class Event... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_custom_types.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:32.559583 | from typing import Any, TYPE_CHECKING
import equinox as eqx
import equinox.internal as eqxi
import jax.tree_util as jtu
import numpy as np
from jaxtyping import (
AbstractDtype,
Array,
ArrayLike,
Bool,
Float,
Int,
PyTree,
Real,
Shaped,
)
if TYPE_CHECKING:
BoolScalarLike = bool... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_local_interpolation.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:32.560748 | from collections.abc import Callable
from typing import cast, TYPE_CHECKING
import jax
import jax.numpy as jnp
import jax.tree_util as jtu
import numpy as np
if TYPE_CHECKING:
from typing import ClassVar as AbstractVar
else:
from equinox import AbstractVar
from equinox.internal import ω
from jaxtyping import... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_integrate.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:32.586750 | import functools as ft
import warnings
from collections.abc import Callable
from typing import ( # noqa: UP035
Any,
cast,
get_args,
get_origin,
Tuple,
)
import equinox as eqx
import equinox.internal as eqxi
import jax
import jax.lax as lax
import jax.numpy as jnp
import jax.tree_util as jtu
import... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_path.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.053695 | import abc
from typing import Generic, TYPE_CHECKING, TypeVar
import equinox as eqx
import jax
import jax.numpy as jnp
if TYPE_CHECKING:
from typing import ClassVar as AbstractVar
else:
from equinox import AbstractVar
from ._custom_types import Control, RealScalarLike
_Control = TypeVar("_Control", bound=... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_misc.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.057572 | from collections.abc import Callable
from typing import cast
import jax
import jax.core
import jax.lax as lax
import jax.numpy as jnp
import jax.tree_util as jtu
import numpy as np
import optimistix as optx
from jaxtyping import Array, ArrayLike, PyTree, Shaped
from ._custom_types import BoolScalarLike, RealScalarLik... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_root_finder/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.087195 | from ._verychord import VeryChord as VeryChord
from ._with_tols import (
use_stepsize_tol as use_stepsize_tol,
with_stepsize_controller_tols as with_stepsize_controller_tols,
)
|
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.112807 | from .align import ALIGN as ALIGN
from .base import (
AbstractAdaptiveSolver as AbstractAdaptiveSolver,
AbstractImplicitSolver as AbstractImplicitSolver,
AbstractItoSolver as AbstractItoSolver,
AbstractSolver as AbstractSolver,
AbstractStratonovichSolver as AbstractStratonovichSolver,
AbstractWr... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_progress_meter.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.133372 | import abc
import importlib.util
import threading
from collections.abc import Callable
from typing import Any, cast, Generic, TypeVar
import equinox as eqx
import equinox.internal as eqxi
import jax
import jax.numpy as jnp
import numpy as np
from jax.experimental import io_callback
from jaxtyping import Array, PyTree
... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_saveat.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.139308 | from collections.abc import Callable, Sequence
import equinox as eqx
import jax.numpy as jnp
from jaxtyping import Array, PyTree, Real
from ._custom_types import RealScalarLike
def save_y(t, y, args):
return y
class SubSaveAt(eqx.Module):
"""Used for finer-grained control over what is saved. A PyTree of t... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_root_finder/_verychord.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.157768 | from collections.abc import Callable
from typing import Any, cast
import equinox as eqx
import jax
import jax.lax as lax
import jax.numpy as jnp
import jax.tree_util as jtu
import lineax as lx
import lineax.internal as lxi
import optimistix as optx
from equinox.internal import ω
from jaxtyping import Array, Bool, PyTr... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_root_finder/_with_tols.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.175748 | import typing
import equinox as eqx
import jax.numpy as jnp
import optimistix as optx
import wadler_lindig as wl
class _UseStepSizeTol:
def __repr__(self):
return "<taken from `diffeqsolve(..., stepsize_controller=...)` argument>"
use_stepsize_tol = _UseStepSizeTol()
class _WithTolsDoc:
def __ini... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solution.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.181032 | import warnings
from typing import Any
import jax
import optimistix as optx
from jaxtyping import Array, Bool, PyTree, Real, Shaped
from ._custom_types import BoolScalarLike, RealScalarLike
from ._global_interpolation import DenseInterpolation
from ._path import AbstractPath
class RESULTS(optx.RESULTS): # pyright:... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/align.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.193006 | import equinox as eqx
import jax.numpy as jnp
import jax.tree_util as jtu
from equinox.internal import ω
from jaxtyping import ArrayLike, PyTree
from .._custom_types import (
AbstractSpaceTimeLevyArea,
Args,
RealScalarLike,
)
from .._local_interpolation import LocalLinearInterpolation
from .._term import (... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/base.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.616595 | import abc
from collections.abc import Callable
from typing import (
Any,
ClassVar,
Generic,
get_args,
get_origin,
TYPE_CHECKING,
TypeVar,
)
import equinox as eqx
import jax.lax as lax
import jax.numpy as jnp
import jax.tree_util as jtu
import optimistix as optx
if TYPE_CHECKING:
from... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/bosh3.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.617605 | from collections.abc import Callable
from typing import ClassVar
import equinox.internal as eqxi
import numpy as np
from .._local_interpolation import ThirdOrderHermitePolynomialInterpolation
from .runge_kutta import AbstractERK, ButcherTableau
_bosh3_tableau = ButcherTableau(
a_lower=(
np.array([1 / 2]... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/dopri5.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.661191 | from collections.abc import Callable
from typing import ClassVar
import equinox.internal as eqxi
import numpy as np
from .._local_interpolation import FourthOrderPolynomialInterpolation
from .runge_kutta import AbstractERK, ButcherTableau
_dopri5_tableau = ButcherTableau(
a_lower=(
np.array([1 / 5]),
... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/dopri8.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.694528 | from collections.abc import Callable
from typing import ClassVar
import equinox.internal as eqxi
import jax
import jax.numpy as jnp
import numpy as np
from equinox.internal import ω
from jaxtyping import Array, PyTree, Shaped
from .._custom_types import RealScalarLike, Y
from .._local_interpolation import AbstractLoc... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/euler.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.715988 | from collections.abc import Callable
from typing import ClassVar, TypeAlias
from equinox.internal import ω
from .._custom_types import Args, BoolScalarLike, DenseInfo, RealScalarLike, VF, Y
from .._local_interpolation import LocalLinearInterpolation
from .._solution import RESULTS
from .._term import AbstractTerm
fro... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/euler_heun.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.722075 | from collections.abc import Callable
from typing import Any, ClassVar, TypeAlias
import equinox.internal as eqxi
from equinox.internal import ω
from .._custom_types import Args, BoolScalarLike, DenseInfo, RealScalarLike, VF, Y
from .._local_interpolation import LocalLinearInterpolation
from .._solution import RESULTS... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/kencarp3.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.752496 | from collections.abc import Callable
from typing import ClassVar, TYPE_CHECKING
import equinox.internal as eqxi
import jax
import jax.numpy as jnp
import numpy as np
import optimistix as optx
if TYPE_CHECKING:
from typing import ClassVar as AbstractClassVar
else:
from equinox import AbstractClassVar
from equ... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/implicit_euler.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.762504 | from collections.abc import Callable
from typing import ClassVar, TypeAlias
import optimistix as optx
from equinox.internal import ω
from .._custom_types import Args, BoolScalarLike, DenseInfo, RealScalarLike, VF, Y
from .._heuristics import is_sde
from .._local_interpolation import LocalLinearInterpolation
from .._r... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/heun.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.764692 | from collections.abc import Callable
from typing import ClassVar
import equinox.internal as eqxi
import numpy as np
from .._local_interpolation import ThirdOrderHermitePolynomialInterpolation
from .base import AbstractStratonovichSolver
from .runge_kutta import AbstractERK, ButcherTableau
_heun_tableau = ButcherTab... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/foster_langevin_srk.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:33.765938 | import abc
from collections.abc import Callable
from typing import Any, Generic, TypeVar
import equinox as eqx
import equinox.internal as eqxi
import jax
import jax.lax as lax
import jax.numpy as jnp
import jax.tree_util as jtu
from equinox import AbstractVar
from jaxtyping import PyTree
from .._custom_types import (... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/kencarp4.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:34.156122 | from collections.abc import Callable
from typing import ClassVar
import equinox.internal as eqxi
import numpy as np
import optimistix as optx
from .._root_finder import VeryChord, with_stepsize_controller_tols
from .base import AbstractImplicitSolver
from .kencarp3 import KenCarpInterpolation
from .runge_kutta import... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/kencarp5.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:34.175671 | from collections.abc import Callable
from typing import ClassVar
import equinox.internal as eqxi
import numpy as np
import optimistix as optx
from .._root_finder import VeryChord, with_stepsize_controller_tols
from .base import AbstractImplicitSolver
from .kencarp3 import KenCarpInterpolation
from .runge_kutta import... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/kvaerno3.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:34.192248 | from collections.abc import Callable
from typing import ClassVar
import equinox.internal as eqxi
import numpy as np
import optimistix as optx
from .._local_interpolation import ThirdOrderHermitePolynomialInterpolation
from .._root_finder import VeryChord, with_stepsize_controller_tols
from .runge_kutta import Abstrac... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/kvaerno4.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:34.261126 | from collections.abc import Callable
from typing import ClassVar
import equinox.internal as eqxi
import numpy as np
import optimistix as optx
from .._local_interpolation import ThirdOrderHermitePolynomialInterpolation
from .._root_finder import VeryChord, with_stepsize_controller_tols
from .runge_kutta import Abstrac... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/midpoint.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:34.326194 | from collections.abc import Callable
from typing import ClassVar
import equinox.internal as eqxi
import numpy as np
from .._local_interpolation import ThirdOrderHermitePolynomialInterpolation
from .base import AbstractStratonovichSolver
from .runge_kutta import AbstractERK, ButcherTableau
_midpoint_tableau = Butche... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/milstein.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:34.327009 | from collections.abc import Callable
from typing import Any, ClassVar, TypeAlias
import jax
import jax.numpy as jnp
import jax.tree_util as jtu
from equinox.internal import ω
from .._custom_types import Args, BoolScalarLike, DenseInfo, RealScalarLike, VF, Y
from .._local_interpolation import LocalLinearInterpolation
... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/leapfrog_midpoint.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:34.346460 | from collections.abc import Callable
from typing import ClassVar, TypeAlias
from equinox.internal import ω
from jaxtyping import PyTree
from .._custom_types import Args, BoolScalarLike, DenseInfo, RealScalarLike, VF, Y
from .._local_interpolation import LocalLinearInterpolation
from .._solution import RESULTS
from ..... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/quicsort.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:34.350242 | import math
import equinox as eqx
import jax
import jax.numpy as jnp
import jax.tree_util as jtu
from equinox.internal import scan_trick, ω
from jaxtyping import ArrayLike, PyTree
from .._custom_types import (
AbstractSpaceTimeTimeLevyArea,
Args,
RealScalarLike,
)
from .._local_interpolation import LocalL... |
patrick-kidger/diffrax | https://github.com/patrick-kidger/diffrax | null | null | null | null | 1,995 | null | null | apache-2.0 | null | null | null | null | null | null | null | diffrax/_solver/kvaerno5.py | null | null | null | null | null | null | Python | 2026-05-04T02:42:34.350875 | from collections.abc import Callable
from typing import ClassVar
import equinox.internal as eqxi
import numpy as np
import optimistix as optx
from .._local_interpolation import ThirdOrderHermitePolynomialInterpolation
from .._root_finder import VeryChord, with_stepsize_controller_tols
from .runge_kutta import Abstrac... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.