Spaces:
Running
Running
File size: 4,278 Bytes
a68eabb 881510e 8df0f23 881510e a68eabb 8df0f23 d8f6559 50c166d d8f6559 50c166d d8f6559 c913712 d8f6559 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
HEADER_MD = """# ๐ฌ BaseChat: Chat with Base LLMs via URIAL
[๐ Paper](https://arxiv.org/abs/2312.01552) | [๐ Website](https://allenai.github.io/re-align/) | [๐ป GitHub](https://github.com/Re-Align/urial) | [๐ฆ X-1](https://x.com/billyuchenlin/status/1799885923045568531) [๐ฆ X-2](https://x.com/billyuchenlin/status/1759541978881311125) | ๐ฎ Contact: [Yuchen Lin](https://yuchenlin.xyz/)
**Talk with __BASE__ LLMs which are not fine-tuned at all. The used URIAL prompt is [here](https://github.com/Re-Align/URIAL/blob/main/urial_prompts/inst_1k_v4.help.txt.md).**
- We now also show the responses of the associated aligned model for comparisons.
"""
js_code_label = """
function addApiKeyLink() {
// Select the div with id 'api_key'
const apiKeyDiv = document.getElementById('api_key');
// Find the span within that div with data-testid 'block-info'
const blockInfoSpan = apiKeyDiv.querySelector('span[data-testid="block-info"]');
// Create the new link element
const newLink = document.createElement('a');
newLink.href = 'https://api.together.ai/settings/api-keys';
newLink.textContent = ' View your keys here.';
newLink.target = '_blank'; // Open link in new tab
newLink.style = 'color: #007bff; text-decoration: underline;';
// Create the additional text
const additionalText = document.createTextNode(' (new account will have free credits to use.)');
// Append the link and additional text to the span
if (blockInfoSpan) {
// add a br
apiKeyDiv.appendChild(document.createElement('br'));
apiKeyDiv.appendChild(newLink);
apiKeyDiv.appendChild(additionalText);
} else {
console.error('Span with data-testid "block-info" not found');
}
}
"""
MODELS = ["Llama-3.1-405B-FP8", "Llama-3-70B", "Llama-3-8B",
"Mistral-7B-v0.1",
"Mixtral-8x22B", "Qwen1.5-72B", "Yi-34B", "Llama-2-7B", "Llama-2-70B", "OLMo-7B"]
HYPERBOLIC_MODELS = ["meta-llama/Meta-Llama-3.1-405B-FP8", "meta-llama/Meta-Llama-3.1-405B-Instruct"]
BASE_TO_ALIGNED = {
"Llama-3-70B": "Llama-3-70B-Instruct",
"Llama-3-8B": "Llama-3-8B-Instruct",
"Mistral-7B-v0.1": "Mistral-7B-v0.1-Instruct",
"Mixtral-8x22B": "Mixtral-8x22B-Instruct",
"Qwen1.5-72B": "Qwen1.5-72B-Instruct",
"Llama-3.1-405B-FP8": "Llama-3.1-405B-Instruct-BF16",
"Yi-34B": "Yi-34B-chat",
"Llama-2-7B": "Llama-2-7B-chat",
"Llama-2-70B": "Llama-2-70B-chat",
"OLMo-7B": "OLMo-7B-Instruct",
}
MODEL_MAPPING = {
"Llama-3-8B": "meta-llama/Llama-3-8b-hf",
"Llama-3-70B": "meta-llama/Llama-3-70b-hf",
"Llama-2-7B": "meta-llama/Llama-2-7b-hf",
"Llama-2-70B": "meta-llama/Llama-2-70b-hf",
"Mistral-7B-v0.1": "mistralai/Mistral-7B-v0.1",
"Mixtral-8x22B": "mistralai/Mixtral-8x22B",
"Qwen1.5-72B": "Qwen/Qwen1.5-72B",
"Yi-34B": "zero-one-ai/Yi-34B",
"Yi-6B": "zero-one-ai/Yi-6B",
"OLMo-7B": "allenai/OLMo-7B",
"Llama-3.1-405B-FP8": "meta-llama/Meta-Llama-3.1-405B-FP8",
# Aligned models below
"Llama-3-70B-Instruct": "meta-llama/Meta-Llama-3-70B-Instruct-Lite",
"Llama-3-8B-Instruct": "meta-llama/Meta-Llama-3-8B-Instruct-Lite",
"Mistral-7B-v0.1-Instruct": "mistralai/Mistral-7B-Instruct-v0.1",
"Mixtral-8x22B-Instruct": "mistralai/Mixtral-8x22B-Instruct-v0.1",
"Qwen1.5-72B-Instruct": "Qwen/Qwen2-72B-Instruct",
"Yi-34B-chat": "zero-one-ai/Yi-34B-Chat",
"Llama-2-7B-chat": "meta-llama/Llama-2-7b-chat-hf",
"Llama-2-70B-chat": "meta-llama/Llama-2-70b-chat-hf",
"OLMo-7B-Instruct": "allenai/OLMo-7B-Instruct",
"Llama-3.1-405B-Instruct-BF16": "meta-llama/Meta-Llama-3.1-405B-Instruct",
}
my_css = """
/* CSS for a link color that is visible on both black and white backgrounds */
a {
color: #1E90FF; /* DodgerBlue */
text-decoration: none; /* Optional: remove underline */
}
a:hover {
color: #104E8B; /* Slightly darker blue for hover effect */
text-decoration: underline; /* Optional: add underline on hover */
}
"""
# import json
# with open("together_model_ids.json", "r") as f:
# TOGETHER_MODEL_IDS = json.load(f)
# for _, model_id in MODEL_MAPPING.items():
# if model_id not in TOGETHER_MODEL_IDS + HYPERBOLIC_MODELS:
# print(model_id) |