Archived
fishomni: Fish Audio drama-3 -- the Qwen3.5-35B-A3B backbone with its block-fp8 experts at f32 scales, a 13-layer codebook tower over the backbone's full-attention cache, the main token over 4097 candidates with repetition-aware sampling, and Fish S2's modified DAC read from codec.pth; one branch on two cards, the input's speaker turns written as fish-speech's server writes them
This commit is contained in:
1 parent
f201c140ab
commit
a01d1c1cd5
4 files changed
+1914
-2
No files matched your search
@@ -7,7 +7,9 @@
|
||||
#include "rad_test.h"
|
||||
|
||||
#include "plugin/registry.h"
|
||||
#include "rad_builder.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
@@ -88,8 +90,8 @@ TEST(the_shipped_architectures_load_with_distinct_selection_keys) {
|
||||
CHECK(keys.emplace(std::make_pair(p.arch_id, p.arch_quant), p.name).second);
|
||||
}
|
||||
const std::set<std::pair<std::string, std::string>> want = {
|
||||
{ "anima", "" }, { "breeze", "" }, { "embeddinggemma2", "" }, { "flux3", "" },
|
||||
{ "flux3distilled", "" },
|
||||
{ "anima", "" }, { "breeze", "" }, { "embeddinggemma2", "" },
|
||||
{ "fishomni", "bsgemm-moe" }, { "flux3", "" }, { "flux3distilled", "" },
|
||||
{ "gemma3", "" }, { "gemma4", "" },
|
||||
{ "gemma4", "compressed-tensors" }, { "glm5next", "" }, { "lfm2", "" }, { "llama", "" },
|
||||
{ "llama", "fp8_e4m3" }, { "qwen35", "" },
|
||||
@@ -133,4 +135,65 @@ TEST(every_shipped_family_has_at_most_one_plugin_for_an_imported_checkpoint) {
|
||||
CHECK(!w8->arch_serves_imports);
|
||||
}
|
||||
|
||||
/* drama-3's input as fish-speech's server writes it (chunking.py, generate.py): each speaker's turn
|
||||
* tagged and stripped, turns on lines of their own, untagged text speaker 0's; refused when empty,
|
||||
* when it holds a token only the prompt builder writes, or when it names a speaker other than 0..15
|
||||
* the canonical way. A refusal leaves its reason in the output. */
|
||||
TEST(fishomni_writes_the_input_as_the_reference_server_does) {
|
||||
Registry r;
|
||||
const int st = r.load_dir(dir_of("architectures"), {});
|
||||
if (st == RAD_E_IO && r.plugins().empty())
|
||||
ARTIFACT_MISSING("the architecture plugins under " + dir_of("architectures"));
|
||||
CHECK_OK(st);
|
||||
const Plugin* p = r.plugin("fishomni");
|
||||
REQUIRE(p != nullptr);
|
||||
REQUIRE(p->arch_text_prepare != nullptr);
|
||||
auto prep = [&](const char* in, std::string* out) {
|
||||
char buf[512] = {};
|
||||
const int64_t n = p->arch_text_prepare(RAD_TEXT_INPUT, in, buf, sizeof buf);
|
||||
*out = buf;
|
||||
return n;
|
||||
};
|
||||
const struct { const char* in; const char* want; } ok[] = {
|
||||
{ "Hello there.", "<|speaker:0|> Hello there." },
|
||||
{ " Hello there. \n", "<|speaker:0|> Hello there." },
|
||||
{ "\xe3\x80\x80Hello\xc2\xa0", "<|speaker:0|> Hello" }, /* U+3000, U+00A0 */
|
||||
{ "<|speaker:0|> Are you ready? <|speaker:1|> Always.",
|
||||
"<|speaker:0|> Are you ready?\n<|speaker:1|> Always." },
|
||||
{ "Hi <|speaker:12|>Hey <|speaker:3|> ", "<|speaker:0|> Hi\n<|speaker:12|> Hey" },
|
||||
{ "<|speaker:2|>[laughs] Fine.", "<|speaker:2|> [laughs] Fine." },
|
||||
};
|
||||
for (const auto& c : ok) {
|
||||
std::string got;
|
||||
const int64_t n = prep(c.in, &got);
|
||||
if (got != c.want) fprintf(stderr, " '%s' -> '%s'\n", c.in, got.c_str());
|
||||
CHECK_EQ(n, (int64_t)std::strlen(c.want));
|
||||
CHECK_EQ(got, std::string(c.want));
|
||||
}
|
||||
const struct { const char* in; const char* why; } refused[] = {
|
||||
{ " \t", "empty" },
|
||||
{ "<|speaker:1|> ", "empty" },
|
||||
{ "Say <|im_end|> now", "<|im_end|>" },
|
||||
{ "<|voice|>", "<|voice|>" },
|
||||
{ "a <|semantic:12|> b", "<|semantic:" },
|
||||
{ "<|speaker:16|> hi", "speaker tags" },
|
||||
{ "<|speaker:01|> hi", "speaker tags" },
|
||||
{ "<|speaker_change|> hi", "speaker tags" },
|
||||
};
|
||||
for (const auto& c : refused) {
|
||||
std::string why;
|
||||
CHECK(prep(c.in, &why) < 0);
|
||||
if (why.find(c.why) == std::string::npos) fprintf(stderr, " '%s': %s\n", c.in, why.c_str());
|
||||
CHECK(why.find(c.why) != std::string::npos);
|
||||
}
|
||||
/* A short buffer still gets the length to retry with, and the instructions (which the model
|
||||
* refuses before they get here) pass as written. */
|
||||
char tiny[4] = {};
|
||||
CHECK_EQ(p->arch_text_prepare(RAD_TEXT_INPUT, "Hello", tiny, sizeof tiny),
|
||||
(int64_t)std::strlen("<|speaker:0|> Hello"));
|
||||
char buf[64] = {};
|
||||
CHECK_EQ(p->arch_text_prepare(RAD_TEXT_INSTRUCTIONS, " calm ", buf, sizeof buf), 6);
|
||||
CHECK_EQ(std::string(buf), std::string(" calm "));
|
||||
}
|
||||
|
||||
RAD_TEST_MAIN()
|
||||
Reference in new issue
Block a user