Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:Updated Together AI models #364

Merged
merged 1 commit into from
Jul 1, 2024
Merged
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
23 changes: 14 additions & 9 deletions src/Providers/TogetherAI/src/Predefined/AllModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,6 @@ public class OpenHermes25Mistral7BModel(TogetherAiProvider provider) : TogetherA
public class Llama27B32KInstruct7BModel(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.Llama27B32KInstruct7B);


/// <inheritdoc cref="TogetherAiModelIds.StripedhyenaNous7B"/>
/// <param name="provider">Open Router Provider Instance</param>
public class StripedhyenaNous7BModel(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.StripedhyenaNous7B);


/// <inheritdoc cref="TogetherAiModelIds.Alpaca7B"/>
/// <param name="provider">Open Router Provider Instance</param>
public class Alpaca7BModel(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.Alpaca7B);
Expand All @@ -320,21 +315,26 @@ public class UpstageSolarInstructV111BModel(TogetherAiProvider provider) : Toget
public class _01AiYiChat34BModel(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds._01AiYiChat34B);


/// <inheritdoc cref="TogetherAiModelIds.MetaLlama370BChat"/>
/// <inheritdoc cref="TogetherAiModelIds.Llama38BChatHfInt4"/>
/// <param name="provider">Open Router Provider Instance</param>
public class MetaLlama370BChatModel(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.MetaLlama370BChat);
public class Llama38BChatHfInt4Model(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.Llama38BChatHfInt4);


/// <inheritdoc cref="TogetherAiModelIds.Llama38BChatHfInt4"/>
/// <inheritdoc cref="TogetherAiModelIds.StripedhyenaNous7B"/>
/// <param name="provider">Open Router Provider Instance</param>
public class Llama38BChatHfInt4Model(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.Llama38BChatHfInt4);
public class StripedhyenaNous7BModel(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.StripedhyenaNous7B);


/// <inheritdoc cref="TogetherAiModelIds.TogethercomputerLlama38BInstructInt8"/>
/// <param name="provider">Open Router Provider Instance</param>
public class TogethercomputerLlama38BInstructInt8Model(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.TogethercomputerLlama38BInstructInt8);


/// <inheritdoc cref="TogetherAiModelIds.MetaLlama370BChat"/>
/// <param name="provider">Open Router Provider Instance</param>
public class MetaLlama370BChatModel(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.MetaLlama370BChat);


/// <inheritdoc cref="TogetherAiModelIds.UpstageSolarInstructV111BInt4"/>
/// <param name="provider">Open Router Provider Instance</param>
public class UpstageSolarInstructV111BInt4Model(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.UpstageSolarInstructV111BInt4);
Expand All @@ -350,3 +350,8 @@ public class MetaLlama38BInstructModel(TogetherAiProvider provider) : TogetherAi
public class MetaLlama370BInstructModel(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.MetaLlama370BInstruct);


/// <inheritdoc cref="TogetherAiModelIds.Gemma2Instruct9B"/>
/// <param name="provider">Open Router Provider Instance</param>
public class Gemma2Instruct9BModel(TogetherAiProvider provider) : TogetherAiModel(provider, TogetherAiModelIds.Gemma2Instruct9B);


55 changes: 33 additions & 22 deletions src/Providers/TogetherAI/src/TogetherAiModelIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@
/// Description: DBRX Instruct is a mixture-of-experts (MoE) large language model trained from scratch by Databricks. DBRX Instruct specializes in few-turn interactions. <br/>
/// HuggingFace Url: <a href="https://huggingface.co/medaltv/dbrx-instruct">https://huggingface.co/medaltv/dbrx-instruct</a>
/// </summary>
ReservedDbrxInstruct,

Check warning on line 502 in src/Providers/TogetherAI/src/TogetherAiModelIds.cs

View workflow job for this annotation

GitHub Actions / Build and test / Build, test and publish

If 'TogetherAiModelIds.ReservedDbrxInstruct' is not used in the current implementation, remove it. Otherwise give it a meaningful name. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700)

Check warning on line 502 in src/Providers/TogetherAI/src/TogetherAiModelIds.cs

View workflow job for this annotation

GitHub Actions / Build and test / Build, test and publish

If 'TogetherAiModelIds.ReservedDbrxInstruct' is not used in the current implementation, remove it. Otherwise give it a meaningful name. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700)

Check warning on line 502 in src/Providers/TogetherAI/src/TogetherAiModelIds.cs

View workflow job for this annotation

GitHub Actions / Build and test / Build, test and publish

If 'TogetherAiModelIds.ReservedDbrxInstruct' is not used in the current implementation, remove it. Otherwise give it a meaningful name. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700)

Check warning on line 502 in src/Providers/TogetherAI/src/TogetherAiModelIds.cs

View workflow job for this annotation

GitHub Actions / Build and test / Build, test and publish

If 'TogetherAiModelIds.ReservedDbrxInstruct' is not used in the current implementation, remove it. Otherwise give it a meaningful name. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700)

Check warning on line 502 in src/Providers/TogetherAI/src/TogetherAiModelIds.cs

View workflow job for this annotation

GitHub Actions / Build and test / Build, test and publish

If 'TogetherAiModelIds.ReservedDbrxInstruct' is not used in the current implementation, remove it. Otherwise give it a meaningful name. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700)

Check warning on line 502 in src/Providers/TogetherAI/src/TogetherAiModelIds.cs

View workflow job for this annotation

GitHub Actions / Build and test / Build, test and publish

If 'TogetherAiModelIds.ReservedDbrxInstruct' is not used in the current implementation, remove it. Otherwise give it a meaningful name. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700)

Check warning on line 502 in src/Providers/TogetherAI/src/TogetherAiModelIds.cs

View workflow job for this annotation

GitHub Actions / Build and test / Build, test and publish

If 'TogetherAiModelIds.ReservedDbrxInstruct' is not used in the current implementation, remove it. Otherwise give it a meaningful name. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700)

Check warning on line 502 in src/Providers/TogetherAI/src/TogetherAiModelIds.cs

View workflow job for this annotation

GitHub Actions / Build and test / Build, test and publish

If 'TogetherAiModelIds.ReservedDbrxInstruct' is not used in the current implementation, remove it. Otherwise give it a meaningful name. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700)

/// <summary>
/// Name: LLaMA-2 Chat (13B) <br/>
Expand Down Expand Up @@ -666,17 +666,6 @@
/// </summary>
Llama27B32KInstruct7B,

/// <summary>
/// Name: StripedHyena Nous (7B) <br/>
/// Organization: Together <br/>
/// Context Length: 32768 <br/>
/// Prompt Cost: $0.2/MTok <br/>
/// Completion Cost: $0.2/MTok <br/>
/// Description: A hybrid architecture composed of multi-head, grouped-query attention and gated convolutions arranged in Hyena blocks, different from traditional decoder-only Transformers <br/>
/// HuggingFace Url: <a href="https://huggingface.co/togethercomputer/StripedHyena-Nous-7B">https://huggingface.co/togethercomputer/StripedHyena-Nous-7B</a>
/// </summary>
StripedhyenaNous7B,

/// <summary>
/// Name: Alpaca (7B) <br/>
/// Organization: Stanford <br/>
Expand Down Expand Up @@ -710,17 +699,6 @@
/// </summary>
_01AiYiChat34B,

/// <summary>
/// Name: Meta Llama 3 70B Chat <br/>
/// Organization: Meta <br/>
/// Context Length: 8192 <br/>
/// Prompt Cost: $0.9/MTok <br/>
/// Completion Cost: $0.9/MTok <br/>
/// Description: Llama 3 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. <br/>
/// HuggingFace Url: <a href="https://huggingface.co/meta-llama/Llama-3-70b-chat-hf">https://huggingface.co/meta-llama/Llama-3-70b-chat-hf</a>
/// </summary>
MetaLlama370BChat,

/// <summary>
/// Name: Llama3 8B Chat HF INT4 <br/>
/// Organization: Meta <br/>
Expand All @@ -732,6 +710,17 @@
/// </summary>
Llama38BChatHfInt4,

/// <summary>
/// Name: StripedHyena Nous (7B) <br/>
/// Organization: Together <br/>
/// Context Length: 32768 <br/>
/// Prompt Cost: $0.2/MTok <br/>
/// Completion Cost: $0.2/MTok <br/>
/// Description: A hybrid architecture composed of multi-head, grouped-query attention and gated convolutions arranged in Hyena blocks, different from traditional decoder-only Transformers <br/>
/// HuggingFace Url: <a href="https://huggingface.co/togethercomputer/StripedHyena-Nous-7B">https://huggingface.co/togethercomputer/StripedHyena-Nous-7B</a>
/// </summary>
StripedhyenaNous7B,

/// <summary>
/// Name: Togethercomputer Llama3 8B Instruct Int8 <br/>
/// Organization: Meta <br/>
Expand All @@ -743,6 +732,17 @@
/// </summary>
TogethercomputerLlama38BInstructInt8,

/// <summary>
/// Name: Meta Llama 3 70B Chat <br/>
/// Organization: Meta <br/>
/// Context Length: 8192 <br/>
/// Prompt Cost: $0.9/MTok <br/>
/// Completion Cost: $0.9/MTok <br/>
/// Description: Llama 3 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. <br/>
/// HuggingFace Url: <a href="https://huggingface.co/meta-llama/Llama-3-70b-chat-hf">https://huggingface.co/meta-llama/Llama-3-70b-chat-hf</a>
/// </summary>
MetaLlama370BChat,

/// <summary>
/// Name: Upstage SOLAR Instruct v1 (11B)-Int4 <br/>
/// Organization: upstage <br/>
Expand Down Expand Up @@ -776,4 +776,15 @@
/// </summary>
MetaLlama370BInstruct,

/// <summary>
/// Name: Gemma-2 Instruct (9B) <br/>
/// Organization: google <br/>
/// Context Length: 8192 <br/>
/// Prompt Cost: $0.3/MTok <br/>
/// Completion Cost: $0.3/MTok <br/>
/// Description: Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models. <br/>
/// HuggingFace Url: <a href="https://huggingface.co/google/gemma-2-9b-it">https://huggingface.co/google/gemma-2-9b-it</a>
/// </summary>
Gemma2Instruct9B,

}
5 changes: 3 additions & 2 deletions src/Providers/TogetherAI/src/TogetherAiModelProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,17 @@ public static class TogetherAiModelProvider
{ TogetherAiModelIds.OpenHermes2Mistral7B, new ChatModels("teknium/OpenHermes-2-Mistral-7B",8192,2.0000000000000002E-07,2.0000000000000002E-07)},
{ TogetherAiModelIds.OpenHermes25Mistral7B, new ChatModels("teknium/OpenHermes-2p5-Mistral-7B",8192,2.0000000000000002E-07,2.0000000000000002E-07)},
{ TogetherAiModelIds.Llama27B32KInstruct7B, new ChatModels("togethercomputer/Llama-2-7B-32K-Instruct",32768,2.0000000000000002E-07,2.0000000000000002E-07)},
{ TogetherAiModelIds.StripedhyenaNous7B, new ChatModels("togethercomputer/StripedHyena-Nous-7B",32768,2.0000000000000002E-07,2.0000000000000002E-07)},
{ TogetherAiModelIds.Alpaca7B, new ChatModels("togethercomputer/alpaca-7b",2048,2.0000000000000002E-07,2.0000000000000002E-07)},
{ TogetherAiModelIds.UpstageSolarInstructV111B, new ChatModels("upstage/SOLAR-10.7B-Instruct-v1.0",4096,3E-07,3E-07)},
{ TogetherAiModelIds._01AiYiChat34B, new ChatModels("zero-one-ai/Yi-34B-Chat",4096,8.000000000000001E-07,8.000000000000001E-07)},
{ TogetherAiModelIds.MetaLlama370BChat, new ChatModels("meta-llama/Llama-3-70b-chat-hf",8192,9.000000000000001E-07,9.000000000000001E-07)},
{ TogetherAiModelIds.Llama38BChatHfInt4, new ChatModels("togethercomputer/Llama-3-8b-chat-hf-int4",8192,2.0000000000000002E-07,2.0000000000000002E-07)},
{ TogetherAiModelIds.StripedhyenaNous7B, new ChatModels("togethercomputer/StripedHyena-Nous-7B",32768,2.0000000000000002E-07,2.0000000000000002E-07)},
{ TogetherAiModelIds.TogethercomputerLlama38BInstructInt8, new ChatModels("togethercomputer/Llama-3-8b-chat-hf-int8",8192,2.0000000000000002E-07,2.0000000000000002E-07)},
{ TogetherAiModelIds.MetaLlama370BChat, new ChatModels("meta-llama/Llama-3-70b-chat-hf",8192,9.000000000000001E-07,9.000000000000001E-07)},
{ TogetherAiModelIds.UpstageSolarInstructV111BInt4, new ChatModels("togethercomputer/SOLAR-10.7B-Instruct-v1.0-int4",4096,3E-07,3E-07)},
{ TogetherAiModelIds.MetaLlama38BInstruct, new ChatModels("meta-llama/Meta-Llama-3-8B-Instruct",8192,2.0000000000000002E-07,2.0000000000000002E-07)},
{ TogetherAiModelIds.MetaLlama370BInstruct, new ChatModels("meta-llama/Meta-Llama-3-70B-Instruct",8192,9.000000000000001E-07,9.000000000000001E-07)},
{ TogetherAiModelIds.Gemma2Instruct9B, new ChatModels("google/gemma-2-9b-it",8192,3E-07,3E-07)},

};

Expand Down