Skip to content

Commit 6c8f47d

Browse files
committed
Code Review
1 parent fcc1b71 commit 6c8f47d

25 files changed

+45
-38
lines changed

TensorStack.TextGeneration/Processing/IKVCache.cs renamed to TensorStack.TextGeneration/Cache/IKVCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Microsoft.ML.OnnxRuntime;
44
using System;
55

6-
namespace TensorStack.TextGeneration.Processing
6+
namespace TensorStack.TextGeneration.Cache
77
{
88
public interface IKVCache : IDisposable
99
{

TensorStack.TextGeneration/Processing/KVCacheDecoder.cs renamed to TensorStack.TextGeneration/Cache/KVCacheDecoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using TensorStack.Common;
55
using Metadata = TensorStack.Common.ModelMetadata;
66

7-
namespace TensorStack.TextGeneration.Processing
7+
namespace TensorStack.TextGeneration.Cache
88
{
99
public sealed class KVCacheDecoder : IKVCache
1010
{

TensorStack.TextGeneration/Processing/KVCacheEncoderDecoder.cs renamed to TensorStack.TextGeneration/Cache/KVCacheEncoderDecoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using TensorStack.Common;
55
using Metadata = TensorStack.Common.ModelMetadata;
66

7-
namespace TensorStack.TextGeneration.Processing
7+
namespace TensorStack.TextGeneration.Cache
88
{
99
public sealed class KVCacheEncoderDecoder : IKVCache
1010
{

TensorStack.TextGeneration/Common/GenerateProgress.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
// Copyright (c) TensorStack. All rights reserved.
22
// Licensed under the Apache 2.0 License.
3-
4-
5-
// Copyright (c) TensorStack. All rights reserved.
6-
// Licensed under the Apache 2.0 License.
7-
83
using TensorStack.Common.Pipeline;
94

105
namespace TensorStack.TextGeneration.Common

TensorStack.TextGeneration/Processing/VisionResult.cs renamed to TensorStack.TextGeneration/Common/VisionResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache 2.0 License.
33
using TensorStack.Common.Tensor;
44

5-
namespace TensorStack.TextGeneration.Processing
5+
namespace TensorStack.TextGeneration.Common
66
{
77
public record VisionResult(Tensor<float> Embeds, Tensor<long> Mask);
88
}

TensorStack.TextGeneration/ITextGeneration.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

TensorStack.TextGeneration/Pipelines/DecoderPipeline.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using TensorStack.TextGeneration.Common;
1212
using TensorStack.TextGeneration.Pipelines.Phi;
1313
using TensorStack.TextGeneration.Processing;
14-
using TensorStack.TextGeneration.Processing.Sampler;
14+
using TensorStack.TextGeneration.Sampler;
1515
using TensorStack.TextGeneration.Tokenizers;
1616

1717
namespace TensorStack.TextGeneration.Pipelines
@@ -105,7 +105,7 @@ protected virtual async Task TokenizePromptAsync(O options)
105105
/// Gets the sampler.
106106
/// </summary>
107107
/// <param name="options">The options.</param>
108-
protected virtual Sampler GetSampler(O options, bool isBeamSerach)
108+
protected virtual SamplerBase GetSampler(O options, bool isBeamSerach)
109109
{
110110
return isBeamSerach
111111
? new MultinomialSampler(options)

TensorStack.TextGeneration/Pipelines/EncoderDecoderPipeline.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Threading.Tasks;
66
using TensorStack.Common;
77
using TensorStack.Common.Tensor;
8+
using TensorStack.TextGeneration.Cache;
89
using TensorStack.TextGeneration.Common;
910
using TensorStack.TextGeneration.Processing;
1011

TensorStack.TextGeneration/Pipelines/Florence/FlorencePipeline.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
using TensorStack.Common.Pipeline;
1313
using TensorStack.Common.Tensor;
1414
using TensorStack.TextGeneration.Common;
15-
using TensorStack.TextGeneration.Processing;
1615
using TensorStack.TextGeneration.Tokenizers;
1716

1817
namespace TensorStack.TextGeneration.Pipelines.Florence

TensorStack.TextGeneration/Pipelines/Other/SummaryPipeline.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
namespace TensorStack.TextGeneration.Pipelines.Other
1313
{
14-
public class SummaryPipeline : EncoderDecoderPipeline<GenerateOptions>, ITextGeneration
14+
public class SummaryPipeline : EncoderDecoderPipeline<GenerateOptions>,
15+
IPipeline<GenerateResult, GenerateOptions, GenerateProgress>,
16+
IPipeline<GenerateResult[], SearchOptions, GenerateProgress>
1517
{
1618
/// <summary>
1719
/// Initializes a new instance of the <see cref="SummaryPipeline"/> class.

0 commit comments

Comments
 (0)