Remove some scaffolding.

This commit is contained in:
Nicolas Patry 2024-12-04 21:54:25 +01:00
parent a78b6fd1e8
commit ca8a115adc
No known key found for this signature in database
GPG Key ID: D2920555C90F704C
2 changed files with 1 additions and 5 deletions

View File

@ -80,7 +80,7 @@ fn get_config(
};
let content = std::fs::read_to_string(filename)?;
let config: RawConfig = serde_json::from_str(&content).expect("?");
let config: RawConfig = serde_json::from_str(&content)?;
let config: Config = config.into();
Ok(config)

View File

@ -2112,10 +2112,6 @@ class FlashCausalLM(Model):
if prefill and prefill_logprobs:
# Get prefill logprobs with inplace softmax (avoid copying the `out` tensor (max_batch_prefill_tokens * vocab_size))
free_memory = get_free_memory(self.device, MEMORY_FRACTION)
logger.info(f"Free memory {free_memory / 1e9}GB")
logmemory = out.nelement() * out.element_size()
logger.info(f"Log memory {logmemory / 1e9}GB")
torch.log_softmax(out, -1, out=out)
prefill_logprobs_tensor = out
prefill_logprobs = torch.gather(