Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .cspell-wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ MPNET
QINT
FNUZ
wordlist
coreml
mobilenetv
jitpack
13 changes: 2 additions & 11 deletions apps/llm/app/llm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ import {
} from 'react-native';
import SendIcon from '../../assets/icons/send_icon.svg';
import Spinner from 'react-native-loading-spinner-overlay';
import {
LLAMA3_2_1B_QLORA,
LLAMA3_2_TOKENIZER,
LLAMA3_2_TOKENIZER_CONFIG,
useLLM,
} from 'react-native-executorch';
import { LLAMA3_2_1B_QLORA, useLLM } from 'react-native-executorch';
import PauseIcon from '../../assets/icons/pause_icon.svg';
import ColorPalette from '../../colors';
import Messages from '../../components/Messages';
Expand All @@ -35,11 +30,7 @@ function LLMScreen() {
const textInputRef = useRef<TextInput>(null);
const { setGlobalGenerating } = useContext(GeneratingContext);

const llm = useLLM({
modelSource: LLAMA3_2_1B_QLORA,
tokenizerSource: LLAMA3_2_TOKENIZER,
tokenizerConfigSource: LLAMA3_2_TOKENIZER_CONFIG,
});
const llm = useLLM(LLAMA3_2_1B_QLORA);

useEffect(() => {
if (llm.error) {
Expand Down
10 changes: 2 additions & 8 deletions apps/llm/app/llm_structured_output/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import {
import SendIcon from '../../assets/icons/send_icon.svg';
import Spinner from 'react-native-loading-spinner-overlay';
import {
QWEN3_TOKENIZER,
QWEN3_TOKENIZER_CONFIG,
useLLM,
fixAndValidateStructuredOutput,
getStructuredOutputPrompt,
Expand Down Expand Up @@ -75,12 +73,8 @@ function LLMScreen() {
const textInputRef = useRef<TextInput>(null);
const { setGlobalGenerating } = useContext(GeneratingContext);

const llm = useLLM({
// try out 4B model it this one struggles with following structured output
modelSource: QWEN3_1_7B_QUANTIZED,
tokenizerSource: QWEN3_TOKENIZER,
tokenizerConfigSource: QWEN3_TOKENIZER_CONFIG,
});
// try out 4B model if this one struggles with following structured output
const llm = useLLM(QWEN3_1_7B_QUANTIZED);

useEffect(() => {
setGlobalGenerating(llm.isGenerating);
Expand Down
8 changes: 1 addition & 7 deletions apps/llm/app/llm_tool_calling/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import SendIcon from '../../assets/icons/send_icon.svg';
import Spinner from 'react-native-loading-spinner-overlay';
import {
HAMMER2_1_1_5B,
HAMMER2_1_TOKENIZER,
HAMMER2_1_TOKENIZER_CONFIG,
useLLM,
DEFAULT_SYSTEM_PROMPT,
} from 'react-native-executorch';
Expand All @@ -41,11 +39,7 @@ function LLMToolCallingScreen() {
const textInputRef = useRef<TextInput>(null);
const { setGlobalGenerating } = useContext(GeneratingContext);

const llm = useLLM({
modelSource: HAMMER2_1_1_5B,
tokenizerSource: HAMMER2_1_TOKENIZER,
tokenizerConfigSource: HAMMER2_1_TOKENIZER_CONFIG,
});
const llm = useLLM(HAMMER2_1_1_5B);

useEffect(() => {
setGlobalGenerating(llm.isGenerating);
Expand Down
8 changes: 1 addition & 7 deletions apps/llm/app/voice_chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import {
useSpeechToText,
useLLM,
QWEN3_0_6B_QUANTIZED,
QWEN3_TOKENIZER,
QWEN3_TOKENIZER_CONFIG,
} from 'react-native-executorch';
import PauseIcon from '../../assets/icons/pause_icon.svg';
import MicIcon from '../../assets/icons/mic_icon.svg';
Expand Down Expand Up @@ -68,11 +66,7 @@ function VoiceChatScreen() {
const messageRecorded = useRef<boolean>(false);
const { setGlobalGenerating } = useContext(GeneratingContext);

const llm = useLLM({
modelSource: QWEN3_0_6B_QUANTIZED,
tokenizerSource: QWEN3_TOKENIZER,
tokenizerConfigSource: QWEN3_TOKENIZER_CONFIG,
});
const llm = useLLM(QWEN3_0_6B_QUANTIZED);
const speechToText = useSpeechToText({
modelName: 'moonshine',
windowSize: 3,
Expand Down
12 changes: 2 additions & 10 deletions apps/text-embeddings/app/text-embeddings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ import {
Platform,
} from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import {
useTextEmbeddings,
ALL_MINILM_L6_V2,
ALL_MINILM_L6_V2_TOKENIZER,
} from 'react-native-executorch';
import { useTextEmbeddings, ALL_MINILM_L6_V2 } from 'react-native-executorch';
import { useIsFocused } from '@react-navigation/native';

export default function TextEmbeddingsScreenWrapper() {
Expand All @@ -25,11 +21,7 @@ export default function TextEmbeddingsScreenWrapper() {
}

function TextEmbeddingsScreen() {
const model = useTextEmbeddings({
modelSource: ALL_MINILM_L6_V2,
tokenizerSource: ALL_MINILM_L6_V2_TOKENIZER,
meanPooling: true,
});
const model = useTextEmbeddings(ALL_MINILM_L6_V2);

const [inputSentence, setInputSentence] = useState('');
const [sentencesWithEmbeddings, setSentencesWithEmbeddings] = useState<
Expand Down
Loading