Skip to content

3.0.2

Compare
Choose a tag to compare
@xenova xenova released this 04 Nov 07:59
· 22 commits to main since this release

What's new?

  • Add support for MobileLLM in #1003

    Example: Text generation with onnx-community/MobileLLM-125M.

    import { pipeline } from "@huggingface/transformers";
    
    // Create a text generation pipeline
    const generator = await pipeline(
      "text-generation",
      "onnx-community/MobileLLM-125M",
      { dtype: "fp32" },
    );
    
    // Define the list of messages
    const text = "Q: What is the capital of France?\nA: Paris\nQ: What is the capital of England?\nA:";
    
    // Generate a response
    const output = await generator(text, { max_new_tokens: 30 });
    console.log(output[0].generated_text);
    Example output
    Q: What is the capital of France?
    A: Paris
    Q: What is the capital of England?
    A: London
    Q: What is the capital of Scotland?
    A: Edinburgh
    Q: What is the capital of Wales?
    A: Cardiff
    
  • Add support for OLMo in #1011

    Example: Text generation with onnx-community/AMD-OLMo-1B-SFT-DPO".

    import { pipeline } from "@huggingface/transformers";
    
    // Create a text generation pipeline
    const generator = await pipeline(
      "text-generation",
      "onnx-community/AMD-OLMo-1B-SFT-DPO",
      { dtype: "q4" },
    );
    
    // Define the list of messages
    const messages = [
      { role: "system", content: "You are a helpful assistant." },
      { role: "user", content: "Tell me a joke." },
    ];
    
    // Generate a response
    const output = await generator(messages, { max_new_tokens: 128 });
    console.log(output[0].generated_text.at(-1).content);
    Example output
    Why don't scientists trust atoms?
    
    Because they make up everything!
    
  • Fix CommonJS bundling in #1012. Thanks @jens-ghc for reporting!

  • Doc fixes by @roschler in #1002

  • Remove duplicate gemma value from NO_PER_CHANNEL_REDUCE_RANGE_MODEL by @bekzod in #1005

🤗 New contributors

Full Changelog: 3.0.1...3.0.2