Skip to content

Commit

Permalink
Fix typos and improve language
Browse files Browse the repository at this point in the history
  • Loading branch information
preciz committed Jul 31, 2024
1 parent b2781bc commit 52f7f8c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/bumblebee/diffusion/layers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ defmodule Bumblebee.Diffusion.Layers do

if rem(embedding_size, 2) != 0 do
raise ArgumentError,
"expected embedding size to an even number, but got: #{inspect(embedding_size)}"
"expected embedding size to be an even number, but got: #{inspect(embedding_size)}"
end

half_size = div(embedding_size, 2)
Expand Down
4 changes: 2 additions & 2 deletions lib/bumblebee/huggingface/transformers/model.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ defprotocol Bumblebee.HuggingFace.Transformers.Model do
...
}
The mapping should always use longest names, that is, depending on
The mapping should always use the longest names, that is, depending on
the architecture, the PyTorch layer name could be either
`"bert.embeddings.word_embeddings"` or `"embeddings.word_embeddings"`.
The longer version should generally be used. Prefixes are removed/added
as necessary, so loading partial models supported automatically.
as necessary, so loading partial models is supported automatically.
The layer names may include simple substitutions, useful for lists
of layers:
Expand Down
4 changes: 2 additions & 2 deletions lib/bumblebee/layers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ defmodule Bumblebee.Layers do
end

@doc """
Splits the input node with shape `{bach_size, sequence_length, 2}` into
Splits the input node with shape `{batch_size, sequence_length, 2}` into
two nodes with shape `{batch_size, sequence_length}`.
"""
def split_pair(%Axon{} = x) do
Expand Down Expand Up @@ -783,7 +783,7 @@ defmodule Bumblebee.Layers do
end

@doc """
Adds a layer that that computes cosine similarity between the inputs.
Adds a layer that computes cosine similarity between the inputs.
"""
def cosine_similarity(x, y) do
Axon.layer(&cosine_similarity_impl/3, [x, y], op_names: :cosine_similarity)
Expand Down
Empty file added lib/bumblebee/text/blip_text_ex
Empty file.
2 changes: 1 addition & 1 deletion test/bumblebee/audio/whisper_test.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Bumblebee.Text.WhisperTest do
defmodule Bumblebee.Audio.WhisperTest do
use ExUnit.Case, async: true

import Bumblebee.TestHelpers
Expand Down

0 comments on commit 52f7f8c

Please sign in to comment.