Updated to types of float and quantized embedding
This commit is contained in:
parent
8531803462
commit
8c21dc02a6
|
@ -29,13 +29,13 @@ NS_SWIFT_NAME(Embedding)
|
||||||
* @brief The Floating-point embedding.
|
* @brief The Floating-point embedding.
|
||||||
* Empty if the embedder was configured to perform scalar quantization.
|
* Empty if the embedder was configured to perform scalar quantization.
|
||||||
*/
|
*/
|
||||||
@property(nonatomic, readonly, nullable) float *floatEmbedding;
|
@property(nonatomic, readonly, nullable) NSArray<NSNumber *> *floatEmbedding;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The Quantized embedding.
|
* @brief The Quantized embedding.
|
||||||
* Empty if the embedder was not configured to perform scalar quantization.
|
* Empty if the embedder was not configured to perform scalar quantization.
|
||||||
*/
|
*/
|
||||||
@property(nonatomic, readonly, nullable) char *quantizedEmbedding;
|
@property(nonatomic, readonly, nullable) NSData *quantizedEmbedding;
|
||||||
|
|
||||||
/** The index of the embedder head these entries refer to. This is useful for multi-head models. */
|
/** The index of the embedder head these entries refer to. This is useful for multi-head models. */
|
||||||
@property(nonatomic, readonly) NSInteger headIndex;
|
@property(nonatomic, readonly) NSInteger headIndex;
|
||||||
|
@ -55,8 +55,8 @@ NS_SWIFT_NAME(Embedding)
|
||||||
* @return An instance of `MPPEmbedding` initialized with the given float embedding, quantized
|
* @return An instance of `MPPEmbedding` initialized with the given float embedding, quantized
|
||||||
* embedding, head index and head name.
|
* embedding, head index and head name.
|
||||||
*/
|
*/
|
||||||
- (instancetype)initWithFloatEmbedding:(nullable float *)floatEmbedding
|
- (instancetype)initWithFloatEmbedding:(nullable NSArray<NSNumber *> *)floatEmbedding
|
||||||
quantizedEmbedding:(nullable char *)quantizedEmbedding
|
quantizedEmbedding:(nullable NSData *)quantizedEmbedding
|
||||||
headIndex:(NSInteger)headIndex
|
headIndex:(NSInteger)headIndex
|
||||||
headName:(nullable NSString *)headName NS_DESIGNATED_INITIALIZER;
|
headName:(nullable NSString *)headName NS_DESIGNATED_INITIALIZER;
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
@implementation MPPEmbedding
|
@implementation MPPEmbedding
|
||||||
|
|
||||||
- (instancetype)initWithFloatEmbedding:(nullable float *)floatEmbedding
|
- (instancetype)initWithFloatEmbedding:(nullable NSArray<NSNumber *> *)floatEmbedding
|
||||||
quantizedEmbedding:(nullable char *)quantizedEmbedding
|
quantizedEmbedding:(nullable NSData *)quantizedEmbedding
|
||||||
headIndex:(NSInteger)headIndex
|
headIndex:(NSInteger)headIndex
|
||||||
headName:(nullable NSString *)headName {
|
headName:(nullable NSString *)headName {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user