File tree Expand file tree Collapse file tree 7 files changed +31
-3
lines changed
extension/android/src/main/java/org/pytorch/executorch Expand file tree Collapse file tree 7 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
package org .pytorch .executorch ;
10
10
11
- /** Codes representing tensor data types. */
11
+ /**
12
+ * Codes representing tensor data types.
13
+ *
14
+ * <p>Warning: These APIs are experimental and subject to change without notice
15
+ */
12
16
public enum DType {
13
17
// NOTE: "jniCode" must be kept in sync with scalar_type.h.
14
18
// NOTE: Never serialize "jniCode", because it can change between releases.
Original file line number Diff line number Diff line change 27
27
*
28
28
* <p>{@code EValue} objects may retain references to objects passed into their constructors, and
29
29
* may return references to their internal state from {@code toX()}.
30
+ *
31
+ * <p>Warning: These APIs are experimental and subject to change without notice
30
32
*/
31
33
@ DoNotStrip
32
34
public class EValue {
Original file line number Diff line number Diff line change 10
10
11
11
import com .facebook .jni .annotations .DoNotStrip ;
12
12
13
+ /**
14
+ * Callback interface for Llama model. Users can implement this interface to receive the generated
15
+ * tokens and statistics.
16
+ *
17
+ * <p>Warning: These APIs are experimental and subject to change without notice
18
+ */
13
19
public interface LlamaCallback {
14
20
/**
15
21
* Called when a new result is available from JNI. Users will keep getting onResult() invocations
Original file line number Diff line number Diff line change 13
13
import com .facebook .soloader .nativeloader .NativeLoader ;
14
14
import com .facebook .soloader .nativeloader .SystemDelegate ;
15
15
16
+ /**
17
+ * LlamaModule is a wrapper around the Executorch Llama model. It provides a simple interface to
18
+ * generate text from the model.
19
+ *
20
+ * <p>Warning: These APIs are experimental and subject to change without notice
21
+ */
16
22
public class LlamaModule {
17
23
18
24
public static final int MODEL_TYPE_TEXT = 1 ;
Original file line number Diff line number Diff line change 12
12
import com .facebook .soloader .nativeloader .SystemDelegate ;
13
13
import java .util .Map ;
14
14
15
- /** Java wrapper for ExecuTorch Module. */
15
+ /**
16
+ * Java wrapper for ExecuTorch Module.
17
+ *
18
+ * <p>Warning: These APIs are experimental and subject to change without notice
19
+ */
16
20
public class Module {
17
21
18
22
/** Load mode for the module. Load the whole file as a buffer. */
Original file line number Diff line number Diff line change 13
13
import com .facebook .soloader .nativeloader .NativeLoader ;
14
14
import java .util .Map ;
15
15
16
- /** Interface for the native peer object for entry points to the Module */
16
+ /**
17
+ * Interface for the native peer object for entry points to the Module
18
+ *
19
+ * <p>Warning: These APIs are experimental and subject to change without notice
20
+ */
17
21
class NativePeer {
18
22
static {
19
23
// Loads libexecutorch.so from jniLibs
Original file line number Diff line number Diff line change 36
36
* between {@link Module} calls to avoid reallocation. Data retrieved from {@code Tensor} objects
37
37
* may be copied or may be a reference to the {@code Tensor}'s internal data buffer. {@code shape}
38
38
* is always copied.
39
+ *
40
+ * <p>Warning: These APIs are experimental and subject to change without notice
39
41
*/
40
42
public abstract class Tensor {
41
43
private static final String ERROR_MSG_DATA_BUFFER_NOT_NULL = "Data buffer must be not null" ;
You can’t perform that action at this time.
0 commit comments