text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
use crate::console_log;
use crate::worker::{ModelData, RunData, Worker, WorkerInput, WorkerOutput};
use wasm_bindgen::prelude::*;
use wasm_bindgen_futures::JsFuture;
use yew::{html, Component, Context, Html};
use yew_agent::{Bridge, Bridged};
async fn fetch_url(url: &str) -> Result<Vec<u8>, JsValue> {
use web_sys:... | candle/candle-wasm-examples/yolo/src/app.rs/0 | {
"file_path": "candle/candle-wasm-examples/yolo/src/app.rs",
"repo_id": "candle",
"token_count": 5971
} | 94 |
<jupyter_start><jupyter_text>Fake LLMLangChain provides a fake LLM class that can be used for testing. This allows you to mock out calls to the LLM and simulate what would happen if the LLM responded in a certain way.In this notebook we go over how to use this.We start this with using the FakeLLM in an agent.<jupyter_c... | langchain/cookbook/fake_llm.ipynb/0 | {
"file_path": "langchain/cookbook/fake_llm.ipynb",
"repo_id": "langchain",
"token_count": 343
} | 76 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-weather/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-weather/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,463 |
"""Interface for selecting examples to include in prompts."""
from abc import ABC, abstractmethod
from typing import Any, Dict, List
class BaseExampleSelector(ABC):
"""Interface for selecting examples to include in prompts."""
@abstractmethod
def add_example(self, example: Dict[str, str]) -> Any:
... | langchain/libs/core/langchain_core/example_selectors/base.py/0 | {
"file_path": "langchain/libs/core/langchain_core/example_selectors/base.py",
"repo_id": "langchain",
"token_count": 160
} | 430 |
import { NodeHandler, ASTParser } from "./base.js";
import { BooleanLiteralType } from "./types.js";
/**
* Handler for boolean literal nodes in the abstract syntax tree (AST).
* Extends the NodeHandler class.
*/
export class BooleanLiteralHandler extends NodeHandler {
/**
* Checks if a given node is a boolean ... | langchainjs/langchain/src/output_parsers/expression_type_handlers/boolean_literal_handler.ts/0 | {
"file_path": "langchainjs/langchain/src/output_parsers/expression_type_handlers/boolean_literal_handler.ts",
"repo_id": "langchainjs",
"token_count": 459
} | 936 |
import * as wasm from "unstable_wasm";
console.log(wasm.tokenize("ab"));
console.log(wasm.tokenize("abc"));
| tokenizers/tokenizers/examples/unstable_wasm/www/index.js/0 | {
"file_path": "tokenizers/tokenizers/examples/unstable_wasm/www/index.js",
"repo_id": "tokenizers",
"token_count": 43
} | 455 |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v4.23.4
// source: chromadb/proto/coordinator.proto
package coordinatorpb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.or... | chroma/go/coordinator/internal/proto/coordinatorpb/coordinator_grpc.pb.go/0 | {
"file_path": "chroma/go/coordinator/internal/proto/coordinatorpb/coordinator_grpc.pb.go",
"repo_id": "chroma",
"token_count": 7459
} | 51 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/indexnode/task_scheduler.go/0 | {
"file_path": "milvus/internal/indexnode/task_scheduler.go",
"repo_id": "milvus",
"token_count": 2722
} | 1,821 |
package indexparamcheck
import (
"strconv"
"testing"
"github.com/stretchr/testify/assert"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/pkg/util/metric"
)
func Test_binFlatChecker_CheckTrain(t *testing.T) {
validParams := map[string]string{
DIM: strconv.Itoa(128),
... | milvus/pkg/util/indexparamcheck/bin_flat_checker_test.go/0 | {
"file_path": "milvus/pkg/util/indexparamcheck/bin_flat_checker_test.go",
"repo_id": "milvus",
"token_count": 1339
} | 2,107 |
# Slack Tool
This tool fetches the text from a list of Slack channels. You will need to initialize the loader with your Slack API Token or have the `SLACK_BOT_TOKEN` environment variable set.
## Usage
```python
from llama_index.tools.slack import SlackToolSpec
from llama_index.agent import OpenAIAgent
tool_spec = S... | llama_index/llama-index-integrations/tools/llama-index-tools-slack/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-slack/README.md",
"repo_id": "llama_index",
"token_count": 241
} | 1,581 |
# coding=utf-8
# Copyright 2022 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... | transformers/src/transformers/models/ernie/configuration_ernie.py/0 | {
"file_path": "transformers/src/transformers/models/ernie/configuration_ernie.py",
"repo_id": "transformers",
"token_count": 3503
} | 667 |
from typing import Any
from llama_index.legacy.output_parsers.base import StructuredOutput
from llama_index.legacy.output_parsers.utils import parse_json_markdown
from llama_index.legacy.types import BaseOutputParser
from llama_index.legacy.vector_stores.types import VectorStoreQuerySpec
class VectorStoreQueryOutput... | llama_index/llama-index-legacy/llama_index/legacy/indices/vector_store/retrievers/auto_retriever/output_parser.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/indices/vector_store/retrievers/auto_retriever/output_parser.py",
"repo_id": "llama_index",
"token_count": 224
} | 1,671 |
FROM python:3.11-slim
RUN pip install poetry==1.6.1
RUN poetry config virtualenvs.create false
WORKDIR /code
COPY ./pyproject.toml ./README.md ./poetry.lock* ./
COPY ./package[s] ./packages
RUN poetry install --no-interaction --no-ansi --no-root
COPY ./app ./app
RUN poetry install --no-interaction --no-ansi
E... | langchain/libs/cli/langchain_cli/project_template/Dockerfile/0 | {
"file_path": "langchain/libs/cli/langchain_cli/project_template/Dockerfile",
"repo_id": "langchain",
"token_count": 155
} | 201 |
/* eslint-disable no-promise-executor-return */
/* eslint-disable no-process-env */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { test, expect } from "@jest/globals";
import { HumanMessage, AIMessage } from "@langchain/core/messages";
import { PlanetScaleChatMessageHistory } from "../message/... | langchainjs/libs/langchain-community/src/stores/tests/planetscale.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/stores/tests/planetscale.int.test.ts",
"repo_id": "langchainjs",
"token_count": 607
} | 1,012 |
<!--Copyright 2021 The HuggingFace 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.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/layoutlmv2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/layoutlmv2.md",
"repo_id": "transformers",
"token_count": 5361
} | 493 |
{
"name": "tokenizers-linux-arm-gnueabihf",
"version": "0.13.4-rc1",
"os": [
"linux"
],
"cpu": [
"arm"
],
"main": "tokenizers.linux-arm-gnueabihf.node",
"files": [
"tokenizers.linux-arm-gnueabihf.node"
],
"description": "Tokenizers platform specific bindings",
"keywords": [
"napi-r... | tokenizers/bindings/node/npm/linux-arm-gnueabihf/package.json/0 | {
"file_path": "tokenizers/bindings/node/npm/linux-arm-gnueabihf/package.json",
"repo_id": "tokenizers",
"token_count": 278
} | 396 |
import { SupabaseVectorStore } from "@langchain/community/vectorstores/supabase";
import { OpenAIEmbeddings } from "@langchain/openai";
import { createClient } from "@supabase/supabase-js";
// First, follow set-up instructions at
// https://js.langchain.com/docs/modules/indexes/vector_stores/integrations/supabase
con... | langchainjs/examples/src/indexes/vector_stores/supabase_with_maximum_marginal_relevance.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/supabase_with_maximum_marginal_relevance.ts",
"repo_id": "langchainjs",
"token_count": 367
} | 853 |
[
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 17934,
"logprob": null,
"text": "Pour"
},
{
"id": 49833,
"logprob": -10.5390625,
"text": "... | text-generation-inference/integration-tests/models/__snapshots__/test_bloom_560m_sharded/test_bloom_560m_sharded_load.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_bloom_560m_sharded/test_bloom_560m_sharded_load.json",
"repo_id": "text-generation-inference",
"token_count": 7258
} | 382 |
"""Tests for the various PDF parsers."""
from pathlib import Path
from typing import Iterator
from langchain_community.document_loaders.base import BaseBlobParser
from langchain_community.document_loaders.blob_loaders import Blob
from langchain_community.document_loaders.parsers.pdf import (
PDFMinerParser,
PD... | langchain/libs/community/tests/integration_tests/document_loaders/parsers/test_pdf_parsers.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/document_loaders/parsers/test_pdf_parsers.py",
"repo_id": "langchain",
"token_count": 1387
} | 352 |
from llama_index.experimental.param_tuner.base import (
AsyncParamTuner,
BaseParamTuner,
ParamTuner,
RayTuneParamTuner,
)
__all__ = ["BaseParamTuner", "ParamTuner", "AsyncParamTuner", "RayTuneParamTuner"]
| llama_index/llama-index-experimental/llama_index/experimental/param_tuner/__init__.py/0 | {
"file_path": "llama_index/llama-index-experimental/llama_index/experimental/param_tuner/__init__.py",
"repo_id": "llama_index",
"token_count": 89
} | 1,235 |
"""Define the API schema."""
from pydantic import BaseModel
class ConversationRequest(BaseModel):
"""Request message to the LangChain."""
# Message is passed directly to the LangChain
# deployed in the plugin.
message: str
class ConversationResponse(BaseModel):
"""Deployed LangChain response.""... | langchain-aiplugin/app/api.py/0 | {
"file_path": "langchain-aiplugin/app/api.py",
"repo_id": "langchain-aiplugin",
"token_count": 97
} | 65 |
from typing import Any, Generator, List, Tuple
import datasets
class SampleHuggingface(datasets.GeneratorBasedBuilder):
"""Sample huggingface dataset with two different versions for testing."""
BUILDER_CONFIGS = [
datasets.BuilderConfig(
name="v1",
version=datasets.Version("1... | langchain/libs/community/tests/unit_tests/document_loaders/sample_documents/sample_hugging_face_dataset.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/document_loaders/sample_documents/sample_hugging_face_dataset.py",
"repo_id": "langchain",
"token_count": 2165
} | 367 |
<jupyter_start><jupyter_text>Code writingExample of how to use LCEL to write Python code.<jupyter_code>%pip install --upgrade --quiet langchain-core langchain-experimental langchain-openai
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import (
ChatPromptTemplate,
)
from lang... | langchain/docs/docs/expression_language/cookbook/code_writing.ipynb/0 | {
"file_path": "langchain/docs/docs/expression_language/cookbook/code_writing.ipynb",
"repo_id": "langchain",
"token_count": 304
} | 89 |
python_tests()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-azureaisearch/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-azureaisearch/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,509 |
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { Pinecone } from "@pinecone-database/pinecone";
import { Document } from "@langchain/core/documents";
import { OpenAIEmbeddings } from "@langchain/openai";
import { PineconeStore } from "@langchain/pinecone";
// Instantiate a new Pinecone client, wh... | langchainjs/examples/src/indexes/vector_stores/pinecone/delete_docs.ts/0 | {
"file_path": "langchainjs/examples/src/indexes/vector_stores/pinecone/delete_docs.ts",
"repo_id": "langchainjs",
"token_count": 625
} | 851 |
python_sources()
python_tests(
name="tests",
)
| llama_index/llama-index-core/tests/playground/BUILD/0 | {
"file_path": "llama_index/llama-index-core/tests/playground/BUILD",
"repo_id": "llama_index",
"token_count": 22
} | 1,322 |
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[tool.codespell]
check-filenames = true
check-hidden = true
skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"
[tool.llamahub]
classes = ["SmartPDFLoader"]
contains_example = false
import_path = "llama_index.readers.smart_pdf_lo... | llama_index/llama-index-integrations/readers/llama-index-readers-smart-pdf-loader/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-smart-pdf-loader/pyproject.toml",
"repo_id": "llama_index",
"token_count": 682
} | 1,382 |
import os
import json
from loguru import logger
import torch
from transformers import AutoTokenizer
from peft import AutoPeftModelForCausalLM, AutoPeftModelForSeq2SeqLM
def download_and_unload_peft(model_id, revision, trust_remote_code):
torch_dtype = torch.float16
logger.info("Trying to load a Peft model. ... | text-generation-inference/server/text_generation_server/utils/peft.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/utils/peft.py",
"repo_id": "text-generation-inference",
"token_count": 629
} | 390 |
import os
import re
from pathlib import Path
from typing import Iterator, List, Optional, Sequence, Tuple, Union
from langchain_core.stores import ByteStore
from langchain.storage.exceptions import InvalidKeyException
class LocalFileStore(ByteStore):
"""BaseStore interface that works on the local file system.
... | langchain/libs/langchain/langchain/storage/file_system.py/0 | {
"file_path": "langchain/libs/langchain/langchain/storage/file_system.py",
"repo_id": "langchain",
"token_count": 1915
} | 552 |
# coding=utf-8
# Copyright 2022 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.0
#
# Unless r... | transformers/tests/models/gpt_neox/test_modeling_gpt_neox.py/0 | {
"file_path": "transformers/tests/models/gpt_neox/test_modeling_gpt_neox.py",
"repo_id": "transformers",
"token_count": 7007
} | 763 |
#!/usr/bin/env groovy
pipeline {
agent {
kubernetes {
defaultContainer 'main'
yamlFile "ci/jenkins/pod/rte-gpu.yaml"
customWorkspace '/home/jenkins/agent/workspace'
// We allow this pod to remain active for a while, later jobs can
// reuse cache i... | milvus/ci/jenkins/PublishGPUImages.groovy/0 | {
"file_path": "milvus/ci/jenkins/PublishGPUImages.groovy",
"repo_id": "milvus",
"token_count": 3070
} | 1,750 |
<jupyter_start><jupyter_text>Chat Engine - ReAct Agent Mode ReAct is an agent based chat mode built on top of a query engine over your data. For each chat interaction, the agent enter a ReAct loop:* first decide whether to use the query engine tool and come up with appropriate input* (optional) use the query engine too... | llama_index/docs/examples/chat_engine/chat_engine_react.ipynb/0 | {
"file_path": "llama_index/docs/examples/chat_engine/chat_engine_react.ipynb",
"repo_id": "llama_index",
"token_count": 941
} | 1,173 |
import logging
from typing import Any, Callable, Dict, Iterator, List, Optional
from langchain_core.documents import Document
from langchain_core.pydantic_v1 import BaseModel, root_validator
logger = logging.getLogger(__name__)
class TensorflowDatasets(BaseModel):
"""Access to the TensorFlow Datasets.
The ... | langchain/libs/community/langchain_community/utilities/tensorflow_datasets.py/0 | {
"file_path": "langchain/libs/community/langchain_community/utilities/tensorflow_datasets.py",
"repo_id": "langchain",
"token_count": 1776
} | 320 |
# Neo4j Vector Index
Neo4j is an open-source graph database with integrated support for vector similarity search.
It supports:
- approximate nearest neighbor search
- Euclidean similarity and cosine similarity
- Hybrid search combining vector and keyword searches
## Setup
To work with Neo4j Vector Index, you need t... | langchainjs/docs/core_docs/docs/integrations/vectorstores/neo4jvector.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/vectorstores/neo4jvector.mdx",
"repo_id": "langchainjs",
"token_count": 764
} | 743 |
import * as fs from "node:fs/promises";
import * as path from "node:path";
import { BaseStore } from "@langchain/core/stores";
/**
* File system implementation of the BaseStore using a dictionary. Used for
* storing key-value pairs in the file system.
* @example
* ```typescript
* const store = await LocalFileStor... | langchainjs/langchain/src/storage/file_system.ts/0 | {
"file_path": "langchainjs/langchain/src/storage/file_system.ts",
"repo_id": "langchainjs",
"token_count": 2059
} | 1,017 |
# LlamaIndex Readers Integration: Pinecone
| llama_index/llama-index-integrations/readers/llama-index-readers-pinecone/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-pinecone/README.md",
"repo_id": "llama_index",
"token_count": 10
} | 1,403 |
"""Chain that carries on a conversation and calls an LLM."""
from typing import Dict, List
from langchain_core.memory import BaseMemory
from langchain_core.prompts import BasePromptTemplate
from langchain_core.pydantic_v1 import Extra, Field, root_validator
from langchain.chains.conversation.prompt import PROMPT
from... | langchain/libs/langchain/langchain/chains/conversation/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/conversation/base.py",
"repo_id": "langchain",
"token_count": 888
} | 487 |
<jupyter_start><jupyter_text>OCI Data Science Model Deployment Endpoint[OCI Data Science](https://docs.oracle.com/en-us/iaas/data-science/using/home.htm) is a fully managed and serverless platform for data science teams to build, train, and manage machine learning models in the Oracle Cloud Infrastructure.This notebook... | langchain/docs/docs/integrations/llms/oci_model_deployment_endpoint.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/llms/oci_model_deployment_endpoint.ipynb",
"repo_id": "langchain",
"token_count": 965
} | 121 |
/* eslint-disable prefer-template */
/* eslint-disable no-param-reassign */
// eslint-disable-next-line import/no-extraneous-dependencies
const swc = require("@swc/core");
const path = require("path");
const fs = require("fs");
/**
*
* @param {string|Buffer} content Content of the resource file
* @param {object} [m... | langchainjs/docs/core_docs/code-block-loader.js/0 | {
"file_path": "langchainjs/docs/core_docs/code-block-loader.js",
"repo_id": "langchainjs",
"token_count": 2111
} | 701 |
import { getEnvironmentVariable } from "@langchain/core/utils/env";
import { Embeddings, EmbeddingsParams } from "@langchain/core/embeddings";
const apiUrl =
"https://llm.api.cloud.yandex.net/foundationModels/v1/textEmbedding";
export interface YandexGPTEmbeddingsParams extends EmbeddingsParams {
/** Model name t... | langchainjs/libs/langchain-yandex/src/embeddings.ts/0 | {
"file_path": "langchainjs/libs/langchain-yandex/src/embeddings.ts",
"repo_id": "langchainjs",
"token_count": 1859
} | 1,112 |
"""Router retriever."""
import asyncio
import logging
from typing import List, Optional, Sequence
from llama_index.legacy.callbacks.schema import CBEventType, EventPayload
from llama_index.legacy.core.base_retriever import BaseRetriever
from llama_index.legacy.core.base_selector import BaseSelector
from llama_index.l... | llama_index/llama-index-legacy/llama_index/legacy/retrievers/router_retriever.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/retrievers/router_retriever.py",
"repo_id": "llama_index",
"token_count": 2622
} | 1,712 |
# coding=utf-8
# Copyright 2020 The HuggingFace 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.0
#
# Unless requir... | transformers/src/transformers/models/mobilebert/configuration_mobilebert.py/0 | {
"file_path": "transformers/src/transformers/models/mobilebert/configuration_mobilebert.py",
"repo_id": "transformers",
"token_count": 3255
} | 641 |
export * from "@langchain/core/tracers/run_collector";
| langchainjs/langchain/src/callbacks/handlers/run_collector.ts/0 | {
"file_path": "langchainjs/langchain/src/callbacks/handlers/run_collector.ts",
"repo_id": "langchainjs",
"token_count": 18
} | 901 |
Quicktour
====================================================================================================
Let's have a quick look at the 🤗 Tokenizers library features. The library provides an
implementation of today's most used tokenizers that is both easy to use and blazing fast.
.. only:: python
It can b... | tokenizers/docs/source/quicktour.rst/0 | {
"file_path": "tokenizers/docs/source/quicktour.rst",
"repo_id": "tokenizers",
"token_count": 8904
} | 474 |
use candle::{DType, Device, Result, Shape, Tensor, Var};
use std::collections::HashMap;
use std::sync::{Arc, Mutex};
/// A `VarMap` is a store that holds named variables. Variables can be retrieved from the stores
/// and new variables can be added by providing some initialization config in case they are
/// missing.
... | candle/candle-nn/src/var_map.rs/0 | {
"file_path": "candle/candle-nn/src/var_map.rs",
"repo_id": "candle",
"token_count": 1973
} | 58 |
"""Tool for the Tavily search API."""
from typing import Dict, List, Optional, Type, Union
from langchain_core.callbacks import (
AsyncCallbackManagerForToolRun,
CallbackManagerForToolRun,
)
from langchain_core.pydantic_v1 import BaseModel, Field
from langchain_core.tools import BaseTool
from langchain_commu... | langchain/libs/community/langchain_community/tools/tavily_search/tool.py/0 | {
"file_path": "langchain/libs/community/langchain_community/tools/tavily_search/tool.py",
"repo_id": "langchain",
"token_count": 1448
} | 314 |
// Copyright (C) 2019-2023 Zilliz. 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.0
//
// Unless required by applicable l... | milvus/internal/core/src/simd/ref.cpp/0 | {
"file_path": "milvus/internal/core/src/simd/ref.cpp",
"repo_id": "milvus",
"token_count": 811
} | 1,661 |
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[tool.codespell]
check-filenames = true
check-hidden = true
skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"
[tool.llamahub]
classes = ["DashVectorReader"]
contains_example = false
import_path = "llama_index.readers.dashvector... | llama_index/llama-index-integrations/readers/llama-index-readers-dashvector/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-dashvector/pyproject.toml",
"repo_id": "llama_index",
"token_count": 644
} | 1,479 |
# Introduction
<img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit12/thumbnail.png" alt="Unit bonus 3 thumbnail"/>
Congratulations on finishing this course! **You now have a solid background in Deep Reinforcement Learning**.
But this course was just the beginning o... | deep-rl-class/units/en/unitbonus3/introduction.mdx/0 | {
"file_path": "deep-rl-class/units/en/unitbonus3/introduction.mdx",
"repo_id": "deep-rl-class",
"token_count": 171
} | 186 |
# Large Language Models
##### FAQ
1. [How to use a custom/local embedding model?](#1-how-to-define-a-custom-llm)
2. [How to use a local hugging face embedding model?](#2-how-to-use-a-different-openai-model)
3. [How can I customize my prompt](#3-how-can-i-customize-my-prompt)
4. [Is it required to fine-tune my model?]... | llama_index/docs/community/faq/llms.md/0 | {
"file_path": "llama_index/docs/community/faq/llms.md",
"repo_id": "llama_index",
"token_count": 745
} | 1,064 |
# Copyright 2023-present the HuggingFace Inc. team.
#
# 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... | peft/src/peft/tuners/loha/config.py/0 | {
"file_path": "peft/src/peft/tuners/loha/config.py",
"repo_id": "peft",
"token_count": 2150
} | 346 |
<!--Copyright 2020 The HuggingFace 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.0
Unless required by applicable law or agreed... | transformers/docs/source/en/main_classes/tokenizer.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/tokenizer.md",
"repo_id": "transformers",
"token_count": 1144
} | 500 |
python_sources()
| llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-jaguar/llama_index/vector_stores/jaguar/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/vector_stores/llama-index-vector-stores-jaguar/llama_index/vector_stores/jaguar/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,525 |
from typing import TYPE_CHECKING
from ....utils import DIFFUSERS_SLOW_IMPORT, _LazyModule
_import_structure = {"pipeline_score_sde_ve": ["ScoreSdeVePipeline"]}
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
from .pipeline_score_sde_ve import ScoreSdeVePipeline
else:
import sys
sys.modules[__name__] = _Laz... | diffusers/src/diffusers/pipelines/deprecated/score_sde_ve/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/score_sde_ve/__init__.py",
"repo_id": "diffusers",
"token_count": 193
} | 256 |
{
"openapi": "3.0.1",
"info": {
"title": "Datasette API",
"description": "Execute SQL queries against a Datasette database and return the results as JSON",
"version": "v1"
},
"servers": [
{
"url": "https://datasette.io"
}
],
"paths": {
"/content.json": {
... | langchain/libs/community/tests/unit_tests/examples/test_specs/datasette/apispec.json/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/examples/test_specs/datasette/apispec.json",
"repo_id": "langchain",
"token_count": 1262
} | 415 |
"""Main entrypoint into package."""
from importlib import metadata
try:
__version__ = metadata.version(__package__)
except metadata.PackageNotFoundError:
# Case where package metadata is not available.
__version__ = ""
del metadata # optional, avoids polluting the results of dir(__package__)
| langchain/libs/community/langchain_community/__init__.py/0 | {
"file_path": "langchain/libs/community/langchain_community/__init__.py",
"repo_id": "langchain",
"token_count": 85
} | 207 |
"""
Copyright (c) 2013, Triad National Security, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and ... | llama_index/llama-index-integrations/tools/llama-index-tools-yelp/llama_index/tools/yelp/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-yelp/llama_index/tools/yelp/base.py",
"repo_id": "llama_index",
"token_count": 953
} | 1,506 |
"""Integration test for compression pipelines."""
from langchain_community.document_transformers import EmbeddingsRedundantFilter
from langchain_community.embeddings import OpenAIEmbeddings
from langchain_core.documents import Document
from langchain.retrievers.document_compressors import (
DocumentCompressorPipel... | langchain/libs/langchain/tests/integration_tests/retrievers/document_compressors/test_base.py/0 | {
"file_path": "langchain/libs/langchain/tests/integration_tests/retrievers/document_compressors/test_base.py",
"repo_id": "langchain",
"token_count": 401
} | 592 |
# coding=utf-8
# Copyright 2021 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.0
#
# Unless r... | transformers/src/transformers/models/vision_text_dual_encoder/modeling_vision_text_dual_encoder.py/0 | {
"file_path": "transformers/src/transformers/models/vision_text_dual_encoder/modeling_vision_text_dual_encoder.py",
"repo_id": "transformers",
"token_count": 10148
} | 761 |
python_tests()
| llama_index/llama-index-finetuning/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-finetuning/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,221 |
# Copyright 2022 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.0
#
# Unless required by appl... | accelerate/src/accelerate/test_utils/scripts/external_deps/test_performance.py/0 | {
"file_path": "accelerate/src/accelerate/test_utils/scripts/external_deps/test_performance.py",
"repo_id": "accelerate",
"token_count": 3907
} | 15 |
# Patience-based Early Exit
Patience-based Early Exit (PABEE) is a plug-and-play inference method for pretrained language models.
We have already implemented it on BERT and ALBERT. Basically, you can make your LM faster and more robust with PABEE. It can even improve the performance of ALBERT on GLUE. The only sacrifi... | transformers/examples/research_projects/bert-loses-patience/README.md/0 | {
"file_path": "transformers/examples/research_projects/bert-loses-patience/README.md",
"repo_id": "transformers",
"token_count": 1323
} | 557 |
<jupyter_start><jupyter_text>Fireworks>[Fireworks](https://app.fireworks.ai/) accelerates product development on generative AI by creating an innovative AI experiment and production platform. This example goes over how to use LangChain to interact with `Fireworks` models.<jupyter_code>import os
from langchain.prompts ... | langchain/docs/docs/integrations/llms/fireworks.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/llms/fireworks.ipynb",
"repo_id": "langchain",
"token_count": 1035
} | 121 |
from langchain_community.tools.office365.send_message import (
O365SendMessage,
SendMessageSchema,
)
__all__ = ["SendMessageSchema", "O365SendMessage"]
| langchain/libs/langchain/langchain/tools/office365/send_message.py/0 | {
"file_path": "langchain/libs/langchain/langchain/tools/office365/send_message.py",
"repo_id": "langchain",
"token_count": 55
} | 556 |
from langchain_community.llms.openlm import OpenLM
__all__ = ["OpenLM"]
| langchain/libs/langchain/langchain/llms/openlm.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/openlm.py",
"repo_id": "langchain",
"token_count": 26
} | 564 |
from langchain_community.utilities.duckduckgo_search import DuckDuckGoSearchAPIWrapper
__all__ = ["DuckDuckGoSearchAPIWrapper"]
| langchain/libs/langchain/langchain/utilities/duckduckgo_search.py/0 | {
"file_path": "langchain/libs/langchain/langchain/utilities/duckduckgo_search.py",
"repo_id": "langchain",
"token_count": 43
} | 603 |
from langchain_community.chat_models.gigachat import (
GigaChat,
)
__all__ = ["GigaChat"]
| langchain/libs/langchain/langchain/chat_models/gigachat.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chat_models/gigachat.py",
"repo_id": "langchain",
"token_count": 38
} | 497 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/querycoordv2/meta/channel_dist_manager_test.go/0 | {
"file_path": "milvus/internal/querycoordv2/meta/channel_dist_manager_test.go",
"repo_id": "milvus",
"token_count": 2409
} | 1,830 |
import {
type VercelPool,
type VercelPoolClient,
type VercelPostgresPoolConfig,
createPool,
} from "@vercel/postgres";
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
import { VectorStore } from "@langchain/core/vectorstores";
import { Document } from "@langchain/core/documents";
import {... | langchainjs/libs/langchain-community/src/vectorstores/vercel_postgres.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/vectorstores/vercel_postgres.ts",
"repo_id": "langchainjs",
"token_count": 4537
} | 1,024 |
from llama_index.core.memory.chat_memory_buffer import ChatMemoryBuffer
from llama_index.core.memory.types import BaseMemory
__all__ = ["BaseMemory", "ChatMemoryBuffer"]
| llama_index/llama-index-core/llama_index/core/memory/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/memory/__init__.py",
"repo_id": "llama_index",
"token_count": 50
} | 1,229 |
import uuid
import pytest
import chromadb.test.property.strategies as strategies
from unittest.mock import patch
from dataclasses import asdict
import random
from hypothesis.stateful import (
Bundle,
RuleBasedStateMachine,
rule,
initialize,
multiple,
precondition,
invariant,
run_state_m... | chroma/chromadb/test/property/test_segment_manager.py/0 | {
"file_path": "chroma/chromadb/test/property/test_segment_manager.py",
"repo_id": "chroma",
"token_count": 1760
} | 23 |
python_tests(
name="tests",
)
| llama_index/llama-index-core/tests/selectors/BUILD/0 | {
"file_path": "llama_index/llama-index-core/tests/selectors/BUILD",
"repo_id": "llama_index",
"token_count": 15
} | 1,243 |
import json
import logging
import os
import threading
import time
from dataclasses import dataclass
from datetime import datetime
from functools import wraps
from typing import List, Optional
import requests
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
logger = log... | llama_index/llama-index-integrations/readers/llama-index-readers-stackoverflow/llama_index/readers/stackoverflow/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-stackoverflow/llama_index/readers/stackoverflow/base.py",
"repo_id": "llama_index",
"token_count": 3048
} | 1,529 |
from langchain_community.agent_toolkits.github.toolkit import (
BranchName,
CommentOnIssue,
CreateFile,
CreatePR,
CreateReviewRequest,
DeleteFile,
DirectoryPath,
GetIssue,
GetPR,
GitHubToolkit,
NoInput,
ReadFile,
SearchCode,
SearchIssuesAndPRs,
UpdateFile,
)
... | langchain/libs/langchain/langchain/agents/agent_toolkits/github/toolkit.py/0 | {
"file_path": "langchain/libs/langchain/langchain/agents/agent_toolkits/github/toolkit.py",
"repo_id": "langchain",
"token_count": 272
} | 464 |
python_sources()
| llama_index/llama-index-packs/llama-index-packs-sub-question-weaviate/llama_index/packs/sub_question_weaviate/BUILD/0 | {
"file_path": "llama_index/llama-index-packs/llama-index-packs-sub-question-weaviate/llama_index/packs/sub_question_weaviate/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,874 |
"""Methods for creating chains that use Ernie function-calling APIs."""
import inspect
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Sequence,
Tuple,
Type,
Union,
cast,
)
from langchain_core.language_models import BaseLanguageModel
from langchain_core.output_parsers ... | langchain/libs/langchain/langchain/chains/ernie_functions/base.py/0 | {
"file_path": "langchain/libs/langchain/langchain/chains/ernie_functions/base.py",
"repo_id": "langchain",
"token_count": 9474
} | 480 |
# coding=utf-8
# Copyright 2022 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.0
#
# Unless r... | transformers/src/transformers/models/mask2former/image_processing_mask2former.py/0 | {
"file_path": "transformers/src/transformers/models/mask2former/image_processing_mask2former.py",
"repo_id": "transformers",
"token_count": 24395
} | 696 |
# Hologres
>[Hologres](https://www.alibabacloud.com/help/en/hologres/latest/introduction) is a unified real-time data warehousing service developed by Alibaba Cloud. You can use Hologres to write, update, process, and analyze large amounts of data in real time.
>`Hologres` supports standard `SQL` syntax, is compatibl... | langchain/docs/docs/integrations/providers/hologres.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/hologres.mdx",
"repo_id": "langchain",
"token_count": 391
} | 142 |
from llama_index.legacy.vector_stores.docarray.hnsw import DocArrayHnswVectorStore
from llama_index.legacy.vector_stores.docarray.in_memory import (
DocArrayInMemoryVectorStore,
)
__all__ = [
"DocArrayInMemoryVectorStore",
"DocArrayHnswVectorStore",
]
| llama_index/llama-index-legacy/llama_index/legacy/vector_stores/docarray/__init__.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/vector_stores/docarray/__init__.py",
"repo_id": "llama_index",
"token_count": 96
} | 1,609 |
package common
type Int64Tuple struct {
Key, Value int64
}
| milvus/pkg/common/tuple.go/0 | {
"file_path": "milvus/pkg/common/tuple.go",
"repo_id": "milvus",
"token_count": 21
} | 1,880 |
from langchain_community.document_loaders.arxiv import ArxivLoader
__all__ = ["ArxivLoader"]
| langchain/libs/langchain/langchain/document_loaders/arxiv.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/arxiv.py",
"repo_id": "langchain",
"token_count": 32
} | 499 |
"""Test EdenAI API wrapper."""
from typing import List
import pytest
from langchain_core.messages import AIMessage, BaseMessage, HumanMessage
from langchain_core.outputs import ChatGeneration, LLMResult
from langchain_community.chat_models.edenai import (
ChatEdenAI,
)
@pytest.mark.scheduled
def test_chat_edena... | langchain/libs/community/tests/integration_tests/chat_models/test_edenai.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/chat_models/test_edenai.py",
"repo_id": "langchain",
"token_count": 848
} | 318 |
from langchain_community.callbacks.streamlit.mutable_expander import (
ChildRecord,
ChildType,
MutableExpander,
)
__all__ = ["ChildType", "ChildRecord", "MutableExpander"]
| langchain/libs/langchain/langchain/callbacks/streamlit/mutable_expander.py/0 | {
"file_path": "langchain/libs/langchain/langchain/callbacks/streamlit/mutable_expander.py",
"repo_id": "langchain",
"token_count": 65
} | 482 |
# coding=utf-8
# Copyright 2022 Google AI and The HuggingFace 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.0
#
#... | transformers/src/transformers/models/owlvit/modeling_owlvit.py/0 | {
"file_path": "transformers/src/transformers/models/owlvit/modeling_owlvit.py",
"repo_id": "transformers",
"token_count": 32554
} | 704 |
<jupyter_start><jupyter_text>Vald> [Vald](https://github.com/vdaas/vald) is a highly scalable distributed fast approximate nearest neighbor (ANN) dense vector search engine.This notebook shows how to use functionality related to the `Vald` database.To run this notebook you need a running Vald cluster.Check [Get Started... | langchain/docs/docs/integrations/vectorstores/vald.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/vectorstores/vald.ipynb",
"repo_id": "langchain",
"token_count": 1498
} | 181 |
<!--Copyright 2022 The HuggingFace 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.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/nezha.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/nezha.md",
"repo_id": "transformers",
"token_count": 906
} | 489 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# 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/LICEN... | transformers/src/transformers/models/cpm/tokenization_cpm_fast.py/0 | {
"file_path": "transformers/src/transformers/models/cpm/tokenization_cpm_fast.py",
"repo_id": "transformers",
"token_count": 4599
} | 616 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/internal/querycoordv2/meta/collection_manager_test.go/0 | {
"file_path": "milvus/internal/querycoordv2/meta/collection_manager_test.go",
"repo_id": "milvus",
"token_count": 6781
} | 1,755 |
<!--Copyright 2024 The HuggingFace 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.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/api/pipelines/stable_diffusion/stable_diffusion_2.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/stable_diffusion_2.md",
"repo_id": "diffusers",
"token_count": 2283
} | 176 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team.
#
# 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... | transformers/src/transformers/models/markuplm/processing_markuplm.py/0 | {
"file_path": "transformers/src/transformers/models/markuplm/processing_markuplm.py",
"repo_id": "transformers",
"token_count": 2520
} | 661 |
# Copyright 2020 The HuggingFace 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.0
#
# Unless required by applicabl... | transformers/tests/models/mbart/test_tokenization_mbart.py/0 | {
"file_path": "transformers/tests/models/mbart/test_tokenization_mbart.py",
"repo_id": "transformers",
"token_count": 6595
} | 739 |
<jupyter_start><jupyter_text>**Fine-tuning Speech Model with 🤗 Transformers** This notebook shows how to fine-tune multi-lingual pretrained speech models for Automatic Speech Recognition. This notebook is built to run on the [TIMIT dataset](https://huggingface.co/datasets/timit) with any speech model checkpoint from t... | notebooks/examples/speech_recognition.ipynb/0 | {
"file_path": "notebooks/examples/speech_recognition.ipynb",
"repo_id": "notebooks",
"token_count": 9428
} | 296 |
import { ChatOpenAI } from "@langchain/openai";
import { AgentExecutor } from "langchain/agents";
import { Calculator } from "langchain/tools/calculator";
import { pull } from "langchain/hub";
import { BufferMemory } from "langchain/memory";
import { formatLogToString } from "langchain/agents/format_scratchpad/log";
im... | langchainjs/examples/src/agents/chat_convo_with_tracing_runnable.ts/0 | {
"file_path": "langchainjs/examples/src/agents/chat_convo_with_tracing_runnable.ts",
"repo_id": "langchainjs",
"token_count": 1050
} | 781 |
---
# Milvus dependent, before running this playbook, modify the Inventory to make sure
# correct IP address and Host name are in place.
- name: Create milvus-etcd, minio, pulsar
hosts: dependencies
become: yes
become_user: root
tags: docker
roles:
- deploy-etcd
- deploy-minio
- deploy-pulsar
# ... | milvus/deployments/docker/cluster-distributed-deployment/deploy-milvus.yml/0 | {
"file_path": "milvus/deployments/docker/cluster-distributed-deployment/deploy-milvus.yml",
"repo_id": "milvus",
"token_count": 313
} | 1,846 |
metrics:
serviceMonitor:
enabled: true
log:
level: debug
proxy:
resources:
requests:
cpu: "0.3"
memory: "256Mi"
rootCoordinator:
resources:
requests:
cpu: "0.3"
memory: "256Mi"
queryCoordinator:
resources:
requests:
cpu: "0.4"
memory: "100Mi"
queryNod... | milvus/tests/scripts/values/pr.yaml/0 | {
"file_path": "milvus/tests/scripts/values/pr.yaml",
"repo_id": "milvus",
"token_count": 1954
} | 2,014 |
from langchain_community.document_loaders.joplin import JoplinLoader
__all__ = ["JoplinLoader"]
| langchain/libs/langchain/langchain/document_loaders/joplin.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/joplin.py",
"repo_id": "langchain",
"token_count": 32
} | 483 |
# Copyright 2023 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.0
#
# Unless required by appl... | trl/examples/scripts/sft.py/0 | {
"file_path": "trl/examples/scripts/sft.py",
"repo_id": "trl",
"token_count": 1545
} | 870 |
""" Global Response Normalization Module
Based on the GRN layer presented in
`ConvNeXt-V2 - Co-designing and Scaling ConvNets with Masked Autoencoders` - https://arxiv.org/abs/2301.00808
This implementation
* works for both NCHW and NHWC tensor layouts
* uses affine param names matching existing torch norm layers
* s... | pytorch-image-models/timm/layers/grn.py/0 | {
"file_path": "pytorch-image-models/timm/layers/grn.py",
"repo_id": "pytorch-image-models",
"token_count": 565
} | 333 |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | milvus/pkg/mq/msgstream/mqwrapper/nmq/nmq_server_test.go/0 | {
"file_path": "milvus/pkg/mq/msgstream/mqwrapper/nmq/nmq_server_test.go",
"repo_id": "milvus",
"token_count": 1473
} | 1,958 |
import pytest
from llama_index.legacy.storage.kvstore.mongodb_kvstore import MongoDBKVStore
try:
from pymongo import MongoClient
except ImportError:
MongoClient = None # type: ignore
@pytest.fixture()
def kvstore_with_data(mongo_kvstore: MongoDBKVStore) -> MongoDBKVStore:
test_key = "test_key"
test_... | llama_index/llama-index-legacy/tests/storage/kvstore/test_mongodb_kvstore.py/0 | {
"file_path": "llama_index/llama-index-legacy/tests/storage/kvstore/test_mongodb_kvstore.py",
"repo_id": "llama_index",
"token_count": 346
} | 1,760 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.