Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -778,10 +778,9 @@ public void run() {
mCurrentSettingsFields.getModelType(),
mCurrentSettingsFields.getBackendType())
== ModelUtils.VISION_MODEL) {
mModule.generateFromPos(
mModule.generate(
finalPrompt,
ModelUtils.VISION_MODEL_SEQ_LEN,
startPos,
MainActivity.this,
false);
} else if (mCurrentSettingsFields.getModelType() == ModelType.LLAMA_GUARD_3) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,24 +218,6 @@ public long prefillPrompt(String prompt, long startPos, int bos, int eos) {
// returns a tuple of (status, updated startPos)
private native int appendTextInput(String prompt, int bos, int eos);

/**
* Generate tokens from the given prompt, starting from the given position.
*
* <p>This is a deprecated API. Please use {@link #generate(String, int, LlmCallback, boolean)}
*
* @param prompt The text prompt to LLaVA.
* @param seqLen The total sequence length, including the prompt tokens and new tokens.
* @param startPos The starting position in KV cache of the input in the LLM.
* @param callback callback object to receive results.
* @param echo indicate whether to echo the input prompt or not.
* @return The error code.
*/
@Deprecated
public int generateFromPos(
String prompt, int seqLen, long startPos, LlmCallback callback, boolean echo) {
return generate(prompt, seqLen, callback, echo);
}

/**
* Reset the context of the LLM. This will clear the KV cache and reset the state of the LLM.
*
Expand Down
Loading