feat: Qwen2 support

This commit is contained in:
John Mai
2024-03-03 22:26:28 +08:00
parent 7b746cb89c
commit 66d9202360
7 changed files with 291 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
52A776182B94B5EE00AA6E80 /* Qwen2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52A776172B94B5EE00AA6E80 /* Qwen2.swift */; };
C3288D762B6D9313009FF608 /* LinearModelTraining.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3288D752B6D9313009FF608 /* LinearModelTraining.swift */; };
C3288D7B2B6D9339009FF608 /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = C3288D7A2B6D9339009FF608 /* ArgumentParser */; };
C34E48F52B696F0B00FCB841 /* LLMTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = C34E48F42B696F0B00FCB841 /* LLMTool.swift */; };
@@ -180,6 +181,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
52A776172B94B5EE00AA6E80 /* Qwen2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Qwen2.swift; sourceTree = "<group>"; };
C325DE3F2B648CDB00628871 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
C3288D732B6D9313009FF608 /* LinearModelTraining */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = LinearModelTraining; sourceTree = BUILT_PRODUCTS_DIR; };
C3288D752B6D9313009FF608 /* LinearModelTraining.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinearModelTraining.swift; sourceTree = "<group>"; };
@@ -363,6 +365,7 @@
C34E48ED2B696E6500FCB841 /* Load.swift */,
C3E786AA2B8D1AEC0004D037 /* Evaluate.swift */,
C3E786AC2B8D4AF50004D037 /* Tokenizer.swift */,
52A776172B94B5EE00AA6E80 /* Qwen2.swift */,
);
path = LLM;
sourceTree = "<group>";
@@ -829,6 +832,7 @@
C3A8B3AC2B9283150002EFB8 /* Models.swift in Sources */,
C3E786AB2B8D1AEC0004D037 /* Evaluate.swift in Sources */,
C38935CC2B869C870037B833 /* Llama.swift in Sources */,
52A776182B94B5EE00AA6E80 /* Qwen2.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@@ -55,6 +55,10 @@
argument = "--model mlx-community/CodeLlama-13b-Instruct-hf-4bit-MLX"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--model mlx-community/Qwen1.5-0.5B-Chat-4bit"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--prompt &apos;func sortArray(_ array: [Int]) -&gt; String { &lt;FILL_ME&gt; }&apos;"
isEnabled = "NO">
@@ -69,7 +73,7 @@
</CommandLineArgument>
<CommandLineArgument
argument = "--model mlx-community/phi-2-hf-4bit-mlx"
isEnabled = "YES">
isEnabled = "NO">
</CommandLineArgument>
</CommandLineArguments>
</LaunchAction>