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
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/data/template/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:34:47.922625
import os from typing import Dict from .base import * from ...utils import import_modules TEMPlATE_FACTORY: Dict[str, Template] = {} def TemplateFactory(version): template = TEMPlATE_FACTORY.get(version, None) assert template, f"{version} is not implmentation" return template def register_template(nam...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/data/template/formatter.py
null
null
null
null
null
null
Python
2026-05-04T02:34:48.431542
from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Dict, Union, List SLOT = Union[str, List[str], Dict[str, str]] @dataclass class Formatter(ABC): slot: SLOT = "" @abstractmethod def apply(self, **kwargs) -> SLOT: ... @dataclass class EmptyFormatter(Formatter): ...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/data/template/phi_template.py
null
null
null
null
null
null
Python
2026-05-04T02:34:48.457702
from dataclasses import dataclass from typing import TYPE_CHECKING, Dict, List, Optional, Sequence, Tuple, Union from .formatter import EmptyFormatter, StringFormatter from .base import Template from .formatter import Formatter from . import register_template from transformers import PreTrainedTokenizer import torch ...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/data/template/pretrain_template.py
null
null
null
null
null
null
Python
2026-05-04T02:34:48.458816
from dataclasses import dataclass from typing import TYPE_CHECKING, Dict, List, Optional, Sequence, Tuple, Union import copy from .formatter import EmptyFormatter, StringFormatter from .base import Template from .formatter import Formatter from ...utils.constants import * from . import register_template from transfor...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/data/template/qwen2_instruct_template.py
null
null
null
null
null
null
Python
2026-05-04T02:34:48.476547
from dataclasses import dataclass from typing import TYPE_CHECKING, Dict, List, Optional, Sequence, Tuple, Union from .formatter import EmptyFormatter, StringFormatter from .base import Template from .formatter import Formatter from . import register_template from transformers import PreTrainedTokenizer import torch ...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/data/template/qwen2_base_template.py
null
null
null
null
null
null
Python
2026-05-04T02:34:48.478308
from dataclasses import dataclass from typing import TYPE_CHECKING, Dict, List, Optional, Sequence, Tuple, Union from .formatter import EmptyFormatter, StringFormatter from .base import Template from .formatter import Formatter from . import register_template from transformers import PreTrainedTokenizer import torch ...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/data/text_preprocess.py
null
null
null
null
null
null
Python
2026-05-04T02:34:48.519838
from typing import Any from .template import TemplateFactory class TextPreprocess: def __init__(self, tokenizer, version): self.tokenizer = tokenizer self.template = TemplateFactory(version)() def __call__(self, messages, mode='train'): return self.template.encode(messages, self....
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/eval/eval_pope.py
null
null
null
null
null
null
Python
2026-05-04T02:34:48.520405
import os import json import argparse def eval_pope(answers, label_file): label_list = [json.loads(q)['label'] for q in open(label_file, 'r')] for answer in answers: text = answer['text'] # Only keep the first sentence if text.find('.') != -1: text = text.split('.')[0] ...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/data/template/llama_template.py
null
null
null
null
null
null
Python
2026-05-04T02:34:48.543133
from dataclasses import dataclass from typing import TYPE_CHECKING, Dict, List, Optional, Sequence, Tuple, Union from packaging import version from .formatter import EmptyFormatter, StringFormatter from .base import Template from .formatter import Formatter from . import register_template from ...utils.constants impor...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/data/template/gemma_template.py
null
null
null
null
null
null
Python
2026-05-04T02:34:48.554895
from dataclasses import dataclass from typing import TYPE_CHECKING, Dict, List, Optional, Sequence, Tuple, Union from packaging import version from .formatter import EmptyFormatter, StringFormatter from .base import Template from .formatter import Formatter from . import register_template from ...utils.constants impor...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/eval/m4c_evaluator.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.058304
# Copyright (c) Facebook, Inc. and its affiliates. import re from tqdm import tqdm class EvalAIAnswerProcessor: """ Processes an answer similar to Eval AI copied from https://github.com/facebookresearch/mmf/blob/c46b3b3391275b4181567db80943473a89ab98ab/pythia/tasks/processors.py#L897 """ ...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/eval/eval_textvqa.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.065562
import os import argparse import json import re from tinyllava.eval.m4c_evaluator import TextVQAAccuracyEvaluator def get_args(): parser = argparse.ArgumentParser() parser.add_argument('--annotation-file', type=str) parser.add_argument('--result-file', type=str) parser.add_argument('--result-dir', ty...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/eval/eval_science_qa.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.066832
import argparse import json import os import re import random def get_args(): parser = argparse.ArgumentParser() parser.add_argument('--base-dir', type=str) parser.add_argument('--result-file', type=str) parser.add_argument('--output-file', type=str) parser.add_argument('--output-result', type=str...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/eval/model_vqa.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.072518
import argparse import torch import os import json from tqdm import tqdm import shortuuid from tinyllava.utils import * from tinyllava.data import * from tinyllava.model import * from PIL import Image import math def split_list(lst, n): """Split a list into n (roughly) equal-sized chunks""" chunk_size = mat...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/eval/model_vqa_loader.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.114802
import argparse import time import torch import os import json from tqdm import tqdm import shortuuid from tinyllava.utils import * from tinyllava.data import * from tinyllava.model import * from torch.utils.data import Dataset, DataLoader from PIL import Image import math def split_list(lst, n): """Split a l...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/eval/model_vqa_pope.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.123433
import argparse import time import torch import os import json from tqdm import tqdm import shortuuid from tinyllava.utils import * from tinyllava.data import * from tinyllava.model import * from torch.utils.data import Dataset, DataLoader from PIL import Image import math def split_list(lst, n): """Split a l...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/eval/model_vqa_science.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.124669
import argparse import torch import os import json from tqdm import tqdm import shortuuid from tinyllava.utils import * from tinyllava.data import * from tinyllava.model import * from PIL import Image import math def split_list(lst, n): """Split a list into n (roughly) equal-sized chunks""" chunk_size = mat...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/eval/model_vqa_mmmu.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.152849
import argparse import torch import os import json import random import numpy as np from tqdm import tqdm import shortuuid from tinyllava.utils import * from tinyllava.data import * from tinyllava.model import * from PIL import Image import math def split_list(lst, n): """Split a list into n (roughly) equal-siz...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/eval/run_tiny_llava.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.170520
import argparse import re import requests from PIL import Image from io import BytesIO import torch from transformers import PreTrainedModel from tinyllava.utils import * from tinyllava.data import * from tinyllava.model import * def image_parser(args): out = args.image_file.split(args.sep) return out def...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.182220
from .llm import * from .connector import * from .vision_tower import * from .configuration_tinyllava import * from .modeling_tinyllava import * from .convert_legecy_weights_to_tinyllavafactory import * from .load_model import *
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/configuration_tinyllava.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.647529
from transformers import PretrainedConfig, LlavaConfig from transformers import CONFIG_MAPPING from transformers import AutoConfig from tinyllava.utils.constants import * class TinyLlavaConfig(PretrainedConfig): model_type = "tinyllava" def __init__( self, llm_model_name_or_path = '', ...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/connector/identity.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.675332
import torch.nn as nn from . import register_connector from .base import Connector @register_connector('identity') class IdentityConnector(Connector): def __init__(self, config=None): super().__init__() self._connector = nn.Identity()
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/connector/base.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.686023
import os import torch import torch.nn as nn class Connector(nn.Module): def __init__(self, config=None): super().__init__() self._connector = None def load_model(self, **kwargs): pretrained_connector_path = kwargs.get('pretrained_connector_path', None) if pretrained_connecto...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/connector/mlp.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.686575
import re import torch.nn as nn from . import register_connector from .base import Connector ACT_TYPE = { 'relu': nn.ReLU, 'gelu': nn.GELU } @register_connector('mlp') class MLPConnector(Connector): def __init__(self, config): super().__init__() mlp_gelu_match = ...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/connector/linear.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.744373
import torch.nn as nn from . import register_connector from .base import Connector @register_connector('linear') class LinearConnector(Connector): def __init__(self, config): super().__init__() self._connector = nn.Linear(config.vision_hidden_size, config.hidden_size) ...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/connector/qformer.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.748983
import torch import torch.nn as nn from transformers.models.bert.configuration_bert import BertConfig from . import register_connector from .base import Connector class QFormer(nn.Module): def __init__(self, config): super().__init__() bert_config = BertConfig.from_pretrained('google-bert/ber...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/connector/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.778621
import os from ...utils import import_modules CONNECTOR_FACTORY = {} def ConnectorFactory(connector_name): model = None for name in CONNECTOR_FACTORY.keys(): if name.lower() in connector_name.lower(): model = CONNECTOR_FACTORY[name] assert model, f"{connector_name} is not registered"...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/connector/resampler.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.779486
import torch import torch.nn as nn from . import register_connector from .base import Connector import torch from einops import rearrange, repeat from einops_exts import rearrange_many from torch import einsum class PerceiverResampler(nn.Module): def __init__(self, config): super().__init__() dim...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/convert_legecy_weights_to_tinyllavafactory.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.887127
import os import json from huggingface_hub import hf_hub_download import torch from safetensors import safe_open from .modeling_tinyllava import TinyLlavaForConditionalGeneration from .configuration_tinyllava import TinyLlavaConfig KEYS_TO_MODIFY_MAPPING = { "model.vision_tower.vision_tower": "vision_tower._visi...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/connector/mof_mlp.py
null
null
null
null
null
null
Python
2026-05-04T02:34:49.999118
import torch import torch.nn as nn from . import register_connector from .base import Connector class MoFMLP(nn.Module): def __init__(self, config): super().__init__() modules_clip = [nn.Linear(config.vision_hidden_size, config.hidden_size), nn.GELU(), ...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/llm/gemma.py
null
null
null
null
null
null
Python
2026-05-04T02:34:50.328585
from transformers import GemmaForCausalLM, AutoTokenizer from . import register_llm @register_llm('gemma') def return_gemmaclass(): def tokenizer_and_post_load(tokenizer): tokenizer.pad_token = tokenizer.unk_token return tokenizer return (GemmaForCausalLM, (AutoTokenizer, tokenizer_and_post_lo...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/llm/stablelm.py
null
null
null
null
null
null
Python
2026-05-04T02:34:50.341198
from transformers import StableLmForCausalLM, AutoTokenizer from . import register_llm @register_llm('stablelm') def return_phiclass(): def tokenizer_and_post_load(tokenizer): return tokenizer return (StableLmForCausalLM, (AutoTokenizer, tokenizer_and_post_load))
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/llm/phi.py
null
null
null
null
null
null
Python
2026-05-04T02:34:50.341797
from transformers import PhiForCausalLM, AutoTokenizer from . import register_llm @register_llm('phi') def return_phiclass(): def tokenizer_and_post_load(tokenizer): tokenizer.pad_token = tokenizer.unk_token return tokenizer return (PhiForCausalLM, (AutoTokenizer, tokenizer_and_post_load))
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/llm/qwen2.py
null
null
null
null
null
null
Python
2026-05-04T02:34:50.370580
from transformers import Qwen2ForCausalLM, AutoTokenizer from . import register_llm @register_llm('qwen2') def return_qwen2class(): def tokenizer_and_post_load(tokenizer): tokenizer.unk_token = tokenizer.pad_token # tokenizer.pad_token = tokenizer.unk_token return tokenizer return Qwen2...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/llm/tinyllama.py
null
null
null
null
null
null
Python
2026-05-04T02:34:50.371258
from transformers import LlamaForCausalLM, AutoTokenizer from . import register_llm @register_llm('tinyllama') def return_tinyllamaclass(): def tokenizer_and_post_load(tokenizer): tokenizer.pad_token = tokenizer.unk_token return tokenizer return LlamaForCausalLM, (AutoTokenizer, tokenizer_and_...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/llm/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:34:50.385629
import os from ...utils import import_modules LLM_FACTORY = {} def LLMFactory(model_name_or_path): model, tokenizer_and_post_load = None, None for name in LLM_FACTORY.keys(): if name in model_name_or_path.lower(): model, tokenizer_and_post_load = LLM_FACTORY[name]() assert model, f"{...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/load_model.py
null
null
null
null
null
null
Python
2026-05-04T02:34:50.386143
import os import torch from collections import OrderedDict from transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig, BitsAndBytesConfig from .modeling_tinyllava import TinyLlavaForConditionalGeneration from .configuration_tinyllava import TinyLlavaConfig def load_base_ckp_for_lora(ckp_path): ckp ...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/modeling_tinyllava.py
null
null
null
null
null
null
Python
2026-05-04T02:34:50.482595
from dataclasses import dataclass from typing import List, Optional, Tuple, Union import ast import torch import torch.utils.checkpoint from torch import nn from transformers import PreTrainedModel from transformers.modeling_outputs import CausalLMOutputWithPast from transformers.generation.utils import GenerateOutpu...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/llm/openelm.py
null
null
null
null
null
null
Python
2026-05-04T02:34:50.542549
# # For licensing see accompanying LICENSE file. # Copyright (C) 2024 Apple Inc. All Rights Reserved. # from typing import List, Optional, Tuple, Union import torch import torch.utils.checkpoint from torch import Tensor, nn from torch.nn import CrossEntropyLoss from torch.nn import functional as F from transformers i...
TinyLLaVA/TinyLLaVA_Factory
https://github.com/TinyLLaVA/TinyLLaVA_Factory
null
null
null
null
977
null
null
apache-2.0
null
null
null
null
null
null
null
tinyllava/model/vision_tower/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:34:50.595808
import os from ...utils import import_modules VISION_TOWER_FACTORY = {} def VisionTowerFactory(vision_tower_name): vision_tower_name = vision_tower_name.split(':')[0] model = None for name in VISION_TOWER_FACTORY.keys(): if name.lower() in vision_tower_name.lower(): model = VISION_TO...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/commands.py
null
null
null
null
null
null
Python
2026-05-04T02:34:52.940201
import logging import os from pathlib import Path import cyclopts from mopidy.config import Config from mopidy_spotify import Extension logger = logging.getLogger(__name__) app = cyclopts.App(help="Spotify extension commands.") @app.command(help="Logout from Spotify account.") def logout() -> None: config = ...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/browse.py
null
null
null
null
null
null
Python
2026-05-04T02:34:52.946040
from __future__ import annotations import logging from typing import TYPE_CHECKING, Any from mopidy.models import Ref from mopidy.types import Uri from mopidy_spotify import playlists, translator from mopidy_spotify.utils import flatten from mopidy_spotify.web import WebLink if TYPE_CHECKING: from collections.a...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/distinct.py
null
null
null
null
null
null
Python
2026-05-04T02:34:52.947307
from __future__ import annotations import logging from typing import TYPE_CHECKING from mopidy_spotify import search if TYPE_CHECKING: from collections.abc import Generator from mopidy.models import SearchResult, Track from mopidy.types import DistinctField, Query, SearchField from mopidy_spotify.p...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/images.py
null
null
null
null
null
null
Python
2026-05-04T02:34:52.962841
from __future__ import annotations import logging from typing import TYPE_CHECKING from mopidy_spotify.browse import BROWSE_DIR_URIS from mopidy_spotify.translator import web_to_image from mopidy_spotify.utils import group_by_type from mopidy_spotify.web import LinkType, WebLink if TYPE_CHECKING: from collection...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:34:52.969694
import pathlib from importlib.metadata import version from typing import override import cyclopts from mopidy import config, ext __version__ = version("mopidy-spotify") class Extension(ext.Extension): dist_name = "mopidy-spotify" ext_name = "spotify" version = __version__ @override def get_defa...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/library.py
null
null
null
null
null
null
Python
2026-05-04T02:34:52.971050
from __future__ import annotations import logging from typing import TYPE_CHECKING, cast, override from mopidy import backend from mopidy_spotify import browse, distinct, images, lookup, search if TYPE_CHECKING: from collections.abc import Iterable from mopidy.models import Image, Ref, SearchResult, Track ...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/search.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.001389
from __future__ import annotations import logging import urllib.parse from typing import TYPE_CHECKING from mopidy.models import SearchResult from mopidy.types import Uri from mopidy_spotify import lookup, translator if TYPE_CHECKING: from collections.abc import Iterable from mopidy.types import Query, Sea...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/playlists.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.052161
from __future__ import annotations import logging import threading from typing import TYPE_CHECKING, Literal, overload, override from mopidy import backend from mopidy.core import CoreListener from mopidy_spotify import translator, utils if TYPE_CHECKING: from collections.abc import Iterable from mopidy.mo...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/backend.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.070028
from __future__ import annotations from typing import TYPE_CHECKING, Any, ClassVar, cast, override import pykka from mopidy import backend from mopidy.types import UriScheme from mopidy_spotify import Extension, library, playlists, web if TYPE_CHECKING: from mopidy.audio import AudioProxy from mopidy.config...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/lookup.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.099997
from __future__ import annotations import logging from typing import TYPE_CHECKING from mopidy import models from mopidy.models import Track from mopidy.types import Uri from mopidy_spotify import browse, playlists, translator from mopidy_spotify.utils import group_by_type from mopidy_spotify.web import LinkType, We...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/translator.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.544294
from __future__ import annotations import logging from typing import TYPE_CHECKING, Any, Literal, overload from mopidy.models import Album, Artist, Image, Playlist, Ref, Track from mopidy.types import DurationMs, Uri if TYPE_CHECKING: from collections.abc import Generator, Iterable, Mapping from mopidy.type...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.545782
from __future__ import annotations import contextlib import itertools import logging import operator import time from typing import TYPE_CHECKING import requests from mopidy import httpclient from mopidy_spotify import Extension, __version__ if TYPE_CHECKING: from collections.abc import Generator, Iterable ...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/types.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.570916
from typing import TypedDict class SpotifyConfig(TypedDict): enabled: bool client_id: str client_secret: str bitrate: int volume_normalization: bool timeout: int allow_cache: bool cache_size: int allow_playlists: bool search_album_count: int search_artist_count: int sea...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.572640
import threading from types import TracebackType class ThreadJoiner: def __init__(self, timeout: int = 1): self.timeout = timeout def __enter__(self): self.before = set(threading.enumerate()) def __exit__( self, exc_type: type[BaseException] | None, exc_val: BaseE...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.577739
from typing import Any from unittest import mock, skip import pytest from mopidy import backend as backend_api from mopidy_spotify import backend, playlists from mopidy_spotify.backend import SpotifyPlaybackProvider from mopidy_spotify.library import SpotifyLibraryProvider from tests import ThreadJoiner def get_bac...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
src/mopidy_spotify/web.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.579620
from __future__ import annotations import copy import itertools import logging import os import re import threading import time import urllib.parse from dataclasses import dataclass from datetime import UTC, datetime from email.utils import parsedate_to_datetime from enum import StrEnum, auto, unique from http import ...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_browse.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.635241
from typing import Any from unittest import mock import pytest from mopidy.models import Ref from mopidy.types import Uri from mopidy_spotify.browse import BROWSE_DIR_URIS from mopidy_spotify.library import SpotifyLibraryProvider def test_has_a_root_directory(provider: SpotifyLibraryProvider): assert provider.r...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_commands.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.655869
from pathlib import Path from mopidy.config import Config from mopidy_spotify import Extension from mopidy_spotify.commands import logout def test_logout_command(tmp_path: Path): config = Config({"core": {"data_dir": tmp_path}}) Config.set_global(config) credentials_dir = Extension().get_credentials_di...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/conftest.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.682293
from pathlib import Path from typing import Any from unittest import mock import pytest from mopidy import backend as backend_api from mopidy.models import Album, Artist from mopidy.types import Uri from mopidy_spotify import backend, utils, web from mopidy_spotify.library import SpotifyLibraryProvider @pytest.fixt...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_distinct.py
null
null
null
null
null
null
Python
2026-05-04T02:34:53.684434
from typing import Any from unittest import mock import pytest from mopidy.models import Album, Artist, SearchResult from mopidy_spotify import distinct, playlists, search from mopidy_spotify.library import SpotifyLibraryProvider @pytest.fixture def web_client_mock_with_playlists( web_client_mock: mock.MagicMoc...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_extension.py
null
null
null
null
null
null
Python
2026-05-04T02:34:54.094580
from pathlib import Path from unittest import mock from mopidy_spotify import Extension from mopidy_spotify import backend as backend_lib def test_get_default_config() -> None: ext = Extension() config = ext.get_default_config() assert "[spotify]" in config assert "enabled = true" in config def t...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_images.py
null
null
null
null
null
null
Python
2026-05-04T02:34:54.132470
from unittest import mock import pytest from mopidy.models import Image from mopidy.types import Uri from mopidy_spotify import images from mopidy_spotify.library import SpotifyLibraryProvider from mopidy_spotify.web import LinkType, WebLink @pytest.fixture def img_provider( provider: SpotifyLibraryProvider, ) ...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_lookup.py
null
null
null
null
null
null
Python
2026-05-04T02:34:54.150678
import copy from typing import Any from unittest import mock import pytest from mopidy.types import Uri from mopidy_spotify import lookup, web from mopidy_spotify.library import SpotifyLibraryProvider @pytest.fixture(autouse=True) def clear_cache(): return lookup._cache.clear() @pytest.mark.parametrize( "...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_playback.py
null
null
null
null
null
null
Python
2026-05-04T02:34:54.152387
from typing import Any from unittest import mock import pytest from mopidy import audio from mopidy import backend as backend_api from mopidy_spotify import backend, web @pytest.fixture def audio_mock() -> mock.Mock: return mock.Mock(spec=audio.Audio) @pytest.fixture def backend_mock(config: dict[str, Any]) -...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_playlists.py
null
null
null
null
null
null
Python
2026-05-04T02:34:54.155099
import logging from typing import Any from unittest import mock import pytest from mopidy import backend as backend_api from mopidy.core import CoreListener from mopidy.models import Ref from mopidy.types import Uri from mopidy_spotify import playlists from tests import ThreadJoiner @pytest.fixture def web_client_m...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_search.py
null
null
null
null
null
null
Python
2026-05-04T02:34:54.207769
from typing import Any from unittest import mock import pytest from mopidy.models import SearchResult from mopidy_spotify import lookup, search, translator from mopidy_spotify.library import SpotifyLibraryProvider def test_search_with_no_query_returns_nothing( provider: SpotifyLibraryProvider, caplog: pytest.Lo...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_utils.py
null
null
null
null
null
null
Python
2026-05-04T02:34:54.215061
import re from unittest import mock import pytest from mopidy_spotify import utils def test_time_logger(caplog: pytest.LogCaptureFixture): with utils.time_logger("task"): pass assert re.match(r".*task took \d+ms.*", caplog.text) def test_group_by_type(): mocks = [mock.Mock(type=i % 3) for i i...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_web.py
null
null
null
null
null
null
Python
2026-05-04T02:34:54.264053
import urllib from datetime import UTC, datetime from typing import Any from unittest import mock import pytest import requests import responses from mopidy.types import Uri from responses import matchers import mopidy_spotify from mopidy_spotify import web @pytest.fixture def oauth_client(config: dict[str, Any]) -...
mopidy/mopidy-spotify
https://github.com/mopidy/mopidy-spotify
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_translator.py
null
null
null
null
null
null
Python
2026-05-04T02:34:54.300359
from typing import Any from unittest import mock from unittest.mock import patch, sentinel import pytest from mopidy.models import Album, Artist, Image, Ref from mopidy.types import Uri from mopidy_spotify import translator class TestWebToArtistRef: @pytest.mark.parametrize( "web_data", [ ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
evaluation/examples/assess_detectability.py
null
null
null
null
null
null
Python
2026-05-04T02:34:56.617088
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
evaluation/examples/assess_quality.py
null
null
null
null
null
null
Python
2026-05-04T02:34:56.618556
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
evaluation/pipelines/quality_analysis.py
null
null
null
null
null
null
Python
2026-05-04T02:34:56.620114
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
evaluation/examples/assess_robustness.py
null
null
null
null
null
null
Python
2026-05-04T02:34:56.621604
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
evaluation/pipelines/detection.py
null
null
null
null
null
null
Python
2026-05-04T02:34:56.622680
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
MarkvLLM_demo.py
null
null
null
null
null
null
Python
2026-05-04T02:34:56.625226
import gc import json import argparse import os, sys import numpy as np from tqdm import tqdm #add MarkLLM root dir to sys.path PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, PROJECT_ROOT) import torch from vllm import LLM, SamplingParams from watermark.kgw.kgw_logits_processor_for_vllm...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
evaluation/tools/oracle.py
null
null
null
null
null
null
Python
2026-05-04T02:34:56.635901
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
evaluation/dataset.py
null
null
null
null
null
null
Python
2026-05-04T02:34:56.647610
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
evaluation/tools/text_editor.py
null
null
null
null
null
null
Python
2026-05-04T02:34:56.653158
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
evaluation/tools/success_rate_calculator.py
null
null
null
null
null
null
Python
2026-05-04T02:34:56.695263
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
utils/openai_utils.py
null
null
null
null
null
null
Python
2026-05-04T02:34:57.657222
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
exceptions/exceptions.py
null
null
null
null
null
null
Python
2026-05-04T02:34:57.658523
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
test/test_pipeline.py
null
null
null
null
null
null
Python
2026-05-04T02:34:57.659719
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
utils/transformers_config.py
null
null
null
null
null
null
Python
2026-05-04T02:34:57.687161
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
test/test_method.py
null
null
null
null
null
null
Python
2026-05-04T02:34:57.838953
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
utils/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:34:57.853402
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
evaluation/tools/text_quality_analyzer.py
null
null
null
null
null
null
Python
2026-05-04T02:34:58.493854
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
visualize/color_scheme.py
null
null
null
null
null
null
Python
2026-05-04T02:34:58.502279
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
test/test_visualize.py
null
null
null
null
null
null
Python
2026-05-04T02:34:58.668536
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
visualize/visualizer.py
null
null
null
null
null
null
Python
2026-05-04T02:34:58.693576
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
watermark/adaptive/adaptive.py
null
null
null
null
null
null
Python
2026-05-04T02:34:59.093676
import torch from transformers import AutoModelForCausalLM, AutoTokenizer from sentence_transformers import SentenceTransformer import random from torch.nn import functional as F from ..base import BaseWatermark, BaseConfig from .semantic_model import SemanticModel from utils.transformers_config import TransformersCon...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
watermark/adaptive/semantic_model.py
null
null
null
null
null
null
Python
2026-05-04T02:34:59.100584
import torch import torch.nn as nn class ResidualBlock(nn.Module): def __init__(self, dim): super(ResidualBlock, self).__init__() self.fc = nn.Linear(dim, dim) self.relu = nn.ReLU() def forward(self, x): out = self.fc(x) out = self.relu(out) out = out + x ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
watermark/auto_watermark.py
null
null
null
null
null
null
Python
2026-05-04T02:34:59.275198
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
visualize/legend_settings.py
null
null
null
null
null
null
Python
2026-05-04T02:34:59.282441
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
watermark/auto_config.py
null
null
null
null
null
null
Python
2026-05-04T02:34:59.296600
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
watermark/base.py
null
null
null
null
null
null
Python
2026-05-04T02:34:59.304278
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
watermark/dip/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:34:59.321706
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
visualize/font_settings.py
null
null
null
null
null
null
Python
2026-05-04T02:34:59.349230
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
visualize/data_for_visualization.py
null
null
null
null
null
null
Python
2026-05-04T02:34:59.415815
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
visualize/page_layout_settings.py
null
null
null
null
null
null
Python
2026-05-04T02:34:59.451274
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...
THU-BPM/MarkLLM
https://github.com/THU-BPM/MarkLLM
null
null
null
null
976
null
null
apache-2.0
null
null
null
null
null
null
null
watermark/dip/dip.py
null
null
null
null
null
null
Python
2026-05-04T02:34:59.665104
# Copyright 2024 THU-BPM MarkLLM. # # 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 agreed to in writ...